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


        ( (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

                                      (int) ( System.currentTimeMillis() - startTime ) );
    }

    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

    protected void setUp()
        throws Exception
    {
        super.setUp();
        reportEntry = new SimpleReportEntry( this.getClass().getName(), "StatelessXMLReporterTest",
                                             new LegacyPojoStackTraceWriter( "", "", new AssertionFailedError() ), 17 );
        stats = new TestSetStats( false, true );
    }
View Full Code Here

    public void testFileNameWithoutSuffix()
    {
        File reportDir = new File( "." );
        String testName = "org.apache.maven.plugin.surefire.report.StatelessXMLReporterTest";
        reportEntry = new SimpleReportEntry( this.getClass().getName(), testName, 12 );
        WrappedReportEntry testSetReportEntry =
            new WrappedReportEntry( reportEntry, ReportEntryType.success, 12, null, null );
        stats.testSucceeded( testSetReportEntry );
        reporter.testSetCompleted( testSetReportEntry, stats );
View Full Code Here

        throws IOException
    {
        File reportDir = new File( "." );
        String testName = "aTestMethod";
        String testName2 = "bTestMethod";
        reportEntry = new SimpleReportEntry( this.getClass().getName(), testName, 12 );
        WrappedReportEntry testSetReportEntry =
            new WrappedReportEntry( reportEntry, ReportEntryType.success, 12, null, null );
        File expectedReportFile = new File( reportDir, "TEST-" + testName + ".xml" );

        stats.testSucceeded( testSetReportEntry );
        StackTraceWriter stackTraceWriter = new DeserializedStacktraceWriter( "A fud msg", "trimmed", "fail at foo" );
        WrappedReportEntry t2 =
            new WrappedReportEntry( new SimpleReportEntry( Inner.class.getName(), testName2, stackTraceWriter, 13 ),
                                    ReportEntryType.error, 13, "std-out!", "std-err?" );

        stats.testSucceeded( t2 );
        StatelessXmlReporter reporter = new StatelessXmlReporter( new File( "." ), null, false );
        reporter.testSetCompleted( testSetReportEntry, stats );
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

    }

    // Handler for TestListener.startTest(Test)
    public void handleStartTest( Object[] args )
    {
        ReportEntry report = new SimpleReportEntry( args[0].getClass().getName(), args[0].toString() );

        reporter.testStarting( report );
    }
View Full Code Here

    {
        boolean testHadFailed = failedTestsSet.remove( new FailedTest( args[0], Thread.currentThread() ) );

        if ( !testHadFailed )
        {
            ReportEntry report = new SimpleReportEntry( args[0].getClass().getName(), args[0].toString() );

            reporter.testSucceeded( report );
        }
    }
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.