Package org.apache.maven.surefire.report

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


    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" );
        DeferredFileOutputStream s = new DeferredFileOutputStream( 1000000, "fds", "fdx", new File( "" ) );
        s.write( "std-o\u00DCt<null>!".getBytes("UTF-8") );
        DeferredFileOutputStream s1 = new DeferredFileOutputStream( 1000000, "fds", "fdx", new File( "" ) );
        byte[] bytes = "std-\u0115rr?&-&amp;&#163;".getBytes("UTF-8");
        s1.write( bytes );
        WrappedReportEntry t2 =
            new WrappedReportEntry( new SimpleReportEntry( Inner.class.getName(), testName2, stackTraceWriter, 13 ),
                                    ReportEntryType.error, 13, s, s1 );

        stats.testSucceeded( t2 );
        StatelessXmlReporter reporter = new StatelessXmlReporter( new File( "." ), null, false );
        reporter.testSetCompleted( testSetReportEntry, stats );
View Full Code Here

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

        }
    }

    protected SimpleReportEntry createReportEntry( Description description )
    {
        return new SimpleReportEntry( getClassName( description ), description.getDisplayName() );
    }
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

    }

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

    private void executeTestSet( SurefireTestSet testSet, RunListener reporter, ClassLoader classLoader )
        throws TestSetFailedException
    {

        ReportEntry report = new SimpleReportEntry( this.getClass().getName(), testSet.getName() );

        reporter.testSetStarting( report );

        testSet.execute( reporter, classLoader );
View Full Code Here

        }

        userFriendlyMethodName += ')';

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

        reportManager.testStarting( report );

        try
        {
            setUpFixture();
        }
        catch ( Throwable e )
        {
            report =
                SimpleReportEntry.withException( testObject.getClass().getName(), getTestName( userFriendlyMethodName ),
                                                 new LegacyPojoStackTraceWriter( testObject.getClass().getName(),
                                                                                 method.getName(), e ) );

            reportManager.testFailed( report );

            // A return value of true indicates to this class's executeTestMethods
            // method that it should abort and not attempt to execute
            // any other test methods. The other caller of this method,
            // TestRerunner.rerun, ignores this return value, because it is
            // only running one test.
            return true;
        }

        // Make sure that tearDownFixture
        try
        {
            method.invoke( testObject, args );

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

            reportManager.testSucceeded( report );
        }
        catch ( InvocationTargetException ite )
        {
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.