Package org.apache.maven.surefire.report

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


        assertEquals( "surefire.testcase.JunitParamsTest", reportName );
    }

    public void testRegular()
    {
        ReportEntry reportEntry = new SimpleReportEntry( "fud", "testSum(surefire.testcase.NonJunitParamsTest)" );
        WrappedReportEntry wr = new WrappedReportEntry( reportEntry, null, 12, null, null );
        final String reportName = wr.getReportName();
        assertEquals( "testSum", reportName );
    }
View Full Code Here


    public void testGetReportNameWithParams()
        throws Exception
    {
        String category = "[0] 1\u002C 2\u002C 3 (testSum)(surefire.testcase.JunitParamsTest)";
        ReportEntry reportEntry = new SimpleReportEntry( "fud", category );
        WrappedReportEntry wr = new WrappedReportEntry( reportEntry, null, 12, null, null );
        final String reportName = wr.getReportName();
        assertEquals( "[0] 1, 2, 3 (testSum)", reportName );
    }
View Full Code Here

    public void testElapsed()
        throws Exception
    {
        String category = "[0] 1\u002C 2\u002C 3 (testSum)(surefire.testcase.JunitParamsTest)";
        ReportEntry reportEntry = new SimpleReportEntry( "fud", category );
        WrappedReportEntry wr = new WrappedReportEntry( reportEntry, null, 12, null, null );
        String elapsedTimeSummary = wr.getElapsedTimeSummary();
        assertEquals( "[0] 1, 2, 3 (testSum)(surefire.testcase.JunitParamsTest)  Time elapsed: 0.012 sec",
                      elapsedTimeSummary );
    }
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

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

        String testHeader = failure.getTestHeader();
        if ( isInsaneJunitNullString( testHeader ) )
        {
            testHeader = "Failure when constructing test";
        }
        ReportEntry report = SimpleReportEntry.withException( getClassName( failure.getDescription() ), testHeader,
                                                              createStackTraceWriter( failure ) );

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

            return;
        }

        try
        {
            ReportEntry report = createReportEntry( null );

            target.testSetStarting( report );

            if ( beforeClass != null )
            {
View Full Code Here

        finishTestSuite( reporter, this );
    }

    public static void startTestSuite( RunListener reporter, Object suite )
    {
        ReportEntry report = new SimpleReportEntry( suite.getClass().getName(), getSuiteName( suite ) );

        try
        {
            reporter.testSetStarting( report );
        }
View Full Code Here

    }

    public static void finishTestSuite( RunListener reporterManager, Object suite )
        throws ReporterException
    {
        ReportEntry report = new SimpleReportEntry( suite.getClass().getName(), getSuiteName( suite ) );

        reporterManager.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

TOP

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

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.