Package org.apache.maven.surefire.report

Examples of org.apache.maven.surefire.report.SimpleReportEntry


        ( (ConsoleOutputReceiver) reporter ).writeTestOutput( buf, off, len, stdout );
    }

    protected SimpleReportEntry createReportEntry( Description description )
    {
        return new SimpleReportEntry( description.getClassName(), description.getDisplayName()/*
                                                                                               * , (int) (
                                                                                               * System.currentTimeMillis
                                                                                               * () - startTime )
                                                                                               */);
    }
View Full Code Here


                                                                                               */);
    }

    protected SimpleReportEntry createReportEntryForTestSet( Description description )
    {
        return new SimpleReportEntry( description.getClassName(), description.getClassName() /*
                                                                                              * , (int) (
                                                                                              * System.currentTimeMillis
                                                                                              * () - startTime )
                                                                                              */);
    }
View Full Code Here

    public void test2DifferentChannels()
        throws ReporterException, IOException
    {
        reset();
        ReportEntry expected = createDefaultReportEntry();
        final SimpleReportEntry secondExpected = createAnotherDefaultReportEntry();

        new ForkingRunListener( printStream, defaultChannel, false ).testStarting( expected );
        new ForkingRunListener( printStream, anotherChannel, false ).testSkipped( secondExpected );

        TestSetMockReporterFactory providerReporterFactory = new TestSetMockReporterFactory();
View Full Code Here

    // Todo: Test weird characters

    private SimpleReportEntry createDefaultReportEntry()
    {
        return new SimpleReportEntry( "com.abc.TestClass", "testMethod", 22 );
    }
View Full Code Here

        return new SimpleReportEntry( "com.abc.TestClass", "testMethod", 22 );
    }

    private SimpleReportEntry createAnotherDefaultReportEntry()
    {
        return new SimpleReportEntry( "com.abc.AnotherTestClass", "testAnotherMethod", 42 );
    }
View Full Code Here

    }

    private void executeTestSet( Class<?> clazz, RunListener reporter, RunNotifier listeners )
        throws ReporterException, TestSetFailedException
    {
        final ReportEntry report = new SimpleReportEntry( this.getClass().getName(), clazz.getName() );

        reporter.testSetStarting( report );

        try
        {
            if ( !StringUtils.isBlank( this.requestedTestMethod ) )
            {
                String actualTestMethod = getMethod( clazz, this.requestedTestMethod );//add by rainLee
                String[] testMethods = StringUtils.split( actualTestMethod, "+" );
                execute( clazz, listeners, testMethods );
            }
            else
            {//the original way
                execute( clazz, listeners, null );
            }
        }
        catch ( TestSetFailedException e )
        {
            throw e;
        }
        catch ( Throwable e )
        {
            reporter.testError( SimpleReportEntry.withException( report.getSourceName(), report.getName(),
                                                                 new PojoStackTraceWriter( report.getSourceName(),
                                                                                           report.getName(), e ) ) );
        }
        finally
        {
            reporter.testSetCompleted( report );
        }
View Full Code Here

        ( (ConsoleOutputReceiver) reporter ).writeTestOutput( buf, off, len, stdout );
    }

    protected SimpleReportEntry createReportEntry( Description description )
    {
        return new SimpleReportEntry( description.getClassName(), description.getDisplayName()/*
                                                                                               * , (int) (
                                                                                               * System.currentTimeMillis
                                                                                               * () - startTime )
                                                                                               */);
    }
View Full Code Here

                                                                                               */);
    }

    protected SimpleReportEntry createReportEntryForTestSet( Description description )
    {
        return new SimpleReportEntry( description.getClassName(), description.getClassName() /*
                                                                                              * , (int) (
                                                                                              * System.currentTimeMillis
                                                                                              * () - startTime )
                                                                                              */);
    }
View Full Code Here

    private ReportEntry createReportEntry( Integer elapsed )
    {
        boolean isJunit3 = testSetDescription.getTestClass() == null;
        String classNameToUse =
            isJunit3 ? testSetDescription.getChildren().get( 0 ).getClassName() : testSetDescription.getClassName();
        return new SimpleReportEntry( classNameToUse, classNameToUse, elapsed );
    }
View Full Code Here

    extends TestCase
{
    public void testTestFailure()
        throws Exception
    {
        ReportEntry reportEntry = new SimpleReportEntry( "a", "b" );
        TestMethod testMethod = new TestMethod( reportEntry );
        testMethod.testFailure( reportEntry );
        final int elapsed = testMethod.getElapsed();
        assertTrue( elapsed >= 0 );
        assertTrue( elapsed < 100000 );
View Full Code Here

TOP

Related Classes of org.apache.maven.surefire.report.SimpleReportEntry

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.