Examples of ReportEntry


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

    public void testSkipped()
        throws ReporterException, IOException
    {
        final StandardTestRun standardTestRun = new StandardTestRun();
        ReportEntry expected = createDefaultReportEntry();
        standardTestRun.run().testSkipped( expected );
        standardTestRun.assertExpected( MockReporter.TEST_SKIPPED, expected );
    }
View Full Code Here

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

    public void testAssumptionFailure()
        throws ReporterException, IOException
    {
        final StandardTestRun standardTestRun = new StandardTestRun();
        ReportEntry expected = createDefaultReportEntry();
        standardTestRun.run().testAssumptionFailure( expected );
        standardTestRun.assertExpected( MockReporter.TEST_ASSUMPTION_FAIL, expected );
    }
View Full Code Here

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

        standardTestRun.run();

        reset();
        RunListener forkingReporter = createForkingRunListener( defaultChannel );

        ReportEntry reportEntry = createDefaultReportEntry();
        forkingReporter.testSetStarting( reportEntry );
        forkingReporter.testStarting( reportEntry );
        forkingReporter.testSucceeded( reportEntry );
        forkingReporter.testSetCompleted( reportEntry );
View Full Code Here

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

    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 );
View Full Code Here

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

        private void assertExpected( String actionCode, ReportEntry expected )
            throws IOException, ReporterException
        {
            clientReceiveContent();
            assertEquals( actionCode, getFirstEvent() );
            final ReportEntry firstData = getFirstData();
            assertEquals( expected.getSourceName(), firstData.getSourceName() );
            assertEquals( expected.getName(), firstData.getName() );
            //noinspection deprecation
            assertEquals( expected.getElapsed(), firstData.getElapsed() );
            assertEquals( expected.getGroup(), firstData.getGroup() );
            if ( expected.getStackTraceWriter() != null )
            {
                //noinspection ThrowableResultOfMethodCallIgnored
                assertEquals( expected.getStackTraceWriter().getThrowable().getLocalizedMessage(),
                              firstData.getStackTraceWriter().getThrowable().getLocalizedMessage() );
                assertEquals( expected.getStackTraceWriter().writeTraceToString(),
                              firstData.getStackTraceWriter().writeTraceToString() );
            }
        }
View Full Code Here

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

    }

    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

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

            return;
        }

        try
        {
            ReportEntry report = createReportEntry( null );

            target.testSetStarting( report );

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

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

    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

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

            int elapsed = 0;
            for ( TestMethod testMethod : testMethods )
            {
                elapsed += testMethod.getElapsed();
            }
            ReportEntry report = createReportEntry( null );

            target.testSetStarting( report );

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

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

            userFriendlyMethodName += "Reporter";
        }

        userFriendlyMethodName += ')';

        ReportEntry report =
            new SimpleReportEntry( testObject.getClass().getName(), getTestName( userFriendlyMethodName ) );

        reportManager.testStarting( report );

        try
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.