Package org.apache.maven.surefire.report

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


        return result.getTestClass().getName();
    }

    public void onTestSuccess( ITestResult result )
    {
        ReportEntry report = new SimpleReportEntry( getSource( result ), getUserFriendlyTestName( result ) );
        reporter.testSucceeded( report );
    }
View Full Code Here


        reporter.testSucceeded( report );
    }

    public void onTestFailure( ITestResult result )
    {
        ReportEntry report = new SimpleReportEntry( getSource( result ), getUserFriendlyTestName( result ),
                                                    new PojoStackTraceWriter(
                                                        result.getTestClass().getRealClass().getName(),
                                                        result.getMethod().getMethodName(), result.getThrowable() ) );

        reporter.testFailed( report );
View Full Code Here

        return result.getName() + "(" + result.getTestClass().getName() + ")";
    }

    public void onTestSkipped( ITestResult result )
    {
        ReportEntry report = new SimpleReportEntry( getSource( result ), getUserFriendlyTestName( result ) );

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

        reporter.testSkipped( report );
    }

    public void onTestFailedButWithinSuccessPercentage( ITestResult result )
    {
        ReportEntry report = new SimpleReportEntry( getSource( result ), getUserFriendlyTestName( result ),
                                                    new PojoStackTraceWriter(
                                                        result.getTestClass().getRealClass().getName(),
                                                        result.getMethod().getMethodName(), result.getThrowable() ) );

        reporter.testError( report );
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
        {
            execute( clazz, listeners, this.requestedTestMethod );
        }
        catch ( TestSetFailedException e )
        {
            throw e;
        }
        catch ( Throwable e )
        {
            reporter.testError( new SimpleReportEntry( report.getSourceName(), report.getName(),
                                                       new PojoStackTraceWriter( report.getSourceName(),
                                                                                 report.getName(), e ) ) );
        }
        finally
        {
            reporter.testSetCompleted( report );
        }
View Full Code Here

     */
    public void testIgnored( Description description )
        throws Exception
    {
        final String reason = jUnit4Reflector.getAnnotatedIgnoreValue( description );
        final SimpleReportEntry report =
            new SimpleReportEntry( extractClassName( description ), description.getDisplayName(), reason );
        reporter.testSkipped( report );
    }
View Full Code Here

    @SuppressWarnings( { "ThrowableResultOfMethodCallIgnored" } )
    public void testFailure( Failure failure )
        throws Exception
    {
        ReportEntry report =
            new SimpleReportEntry( extractClassName( failure.getDescription() ), failure.getTestHeader(),
                                   new JUnit4StackTraceWriter( failure ) );

        if ( failure.getException() instanceof AssertionError )
        {
            this.reporter.testFailed( report );
View Full Code Here

        }
    }

    private SimpleReportEntry createReportEntry( Description description )
    {
        return new SimpleReportEntry( extractClassName( description ), description.getDisplayName() );
    }
View Full Code Here

    {
        File data = File.createTempFile( "surefire-unit", "test" );
        RunEntryStatisticsMap existingEntries = RunEntryStatisticsMap.fromFile( data );
        RunEntryStatisticsMap newResults = new RunEntryStatisticsMap();

        ReportEntry reportEntry1 = new SimpleReportEntry( "abc", "method1", new Integer( 42 ) );
        ReportEntry reportEntry2 = new SimpleReportEntry( "abc", "willFail", new Integer( 17 ) );
        ReportEntry reportEntry3 = new SimpleReportEntry( "abc", "method3", new Integer( 100 ) );

        newResults.add( existingEntries.createNextGeneration( reportEntry1 ) );
        newResults.add( existingEntries.createNextGeneration( reportEntry2 ) );
        newResults.add( existingEntries.createNextGeneration( reportEntry3 ) );
View Full Code Here

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

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

        TestSetMockReporterFactory providerReporterFactory = new TestSetMockReporterFactory();
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.