Package net.flexmojos.oss.test.report

Examples of net.flexmojos.oss.test.report.TestCaseReport


        AssertJUnit.assertTrue( "Report folder not created!", sureFireReports.isDirectory() );

        File reportFile = new File( sureFireReports, "TEST-" + testClass + ".xml" );
        AssertJUnit.assertTrue( "Report was not created!", reportFile.isFile() );

        TestCaseReport report = new TestCaseReport( Xpp3DomBuilder.build( new FileReader( reportFile ) ) );

        return report;
    }
View Full Code Here


        throws Exception
    {
        FMVerifier v = standardConceptTester( "/fluint-example/pass" );
        File testDir = new File( v.getBasedir() );

        TestCaseReport report = getTestReport( testDir, "fluint.ExampleTest" );

        AssertJUnit.assertEquals( 0, report.getErrors() );
        AssertJUnit.assertEquals( 0, report.getFailures() );
        AssertJUnit.assertEquals( 1, report.getTests() );
    }
View Full Code Here

        {
            File reportDir = new File( testDir, "target/surefire-reports" );
            assertEquals( 2, reportDir.listFiles().length );

            File reportFile = new File( reportDir, "TEST-com.adobe.example.TestCalculator.xml" );
            TestCaseReport report = new TestCaseReport( Xpp3DomBuilder.build( new FileReader( reportFile ) ) );

            assertEquals( "com.adobe.example.TestCalculator", report.getName() );
            assertEquals( 2, report.getTests() );
            assertEquals( 1, report.getErrors() );
        }

    }
View Full Code Here

        {
            test( testDir, "install" );
        }
        finally
        {
            TestCaseReport report = getTestReport( testDir, "fluint.ExampleTest" );

            AssertJUnit.assertEquals( 0, report.getErrors() );
            AssertJUnit.assertEquals( 1, report.getFailures() );
            AssertJUnit.assertEquals( 1, report.getTests() );
        }
    }
View Full Code Here

        AssertJUnit.assertEquals( "Expected for 1 files, got: " + Arrays.toString( reportFiles ), 1, reportFiles.length );

        File reportFile = new File( sureFireReports, "TEST-AnnotatedTest.addition.AnnotatedTest.xml" );
        AssertJUnit.assertTrue( "Report was not created!", reportFile.isFile() );

        TestCaseReport report = new TestCaseReport( Xpp3DomBuilder.build( new FileReader( reportFile ) ) );

        AssertJUnit.assertEquals( 0, report.getErrors() );
        AssertJUnit.assertEquals( 0, report.getFailures() );
        AssertJUnit.assertEquals( 1, report.getTests() );
    }
View Full Code Here

                                      reportFiles.length );

            File reportFile = new File( sureFireReports, "TEST-com.adobe.example.TestCalculator.xml" );
            AssertJUnit.assertTrue( "Report was not created!", reportFile.isFile() );

            TestCaseReport report = new TestCaseReport( Xpp3DomBuilder.build( new FileReader( reportFile ) ) );

            AssertJUnit.assertEquals( 1, report.getErrors() );
            AssertJUnit.assertEquals( 1, report.getFailures() );
            AssertJUnit.assertEquals( 3, report.getTests() );

            File testClasses = new File( target, "test-classes" );
            AssertJUnit.assertTrue( "test-classes folder not created!", testClasses.isDirectory() );

            File mxml = new File( testClasses, "TestRunner.mxml" );
View Full Code Here

                                      reportFiles.length );

            File reportFile = new File( sureFireReports, "TEST-com.adobe.example.TestCalculator.xml" );
            AssertJUnit.assertTrue( "Report was not created!", reportFile.isFile() );

            TestCaseReport report = new TestCaseReport( Xpp3DomBuilder.build( new FileReader( reportFile ) ) );

            AssertJUnit.assertEquals( 1, report.getErrors() );
            AssertJUnit.assertEquals( 1, report.getFailures() );
            AssertJUnit.assertEquals( 3, report.getTests() );

            File testClasses = new File( target, "test-classes" );
            AssertJUnit.assertTrue( "test-classes folder not created!", testClasses.isDirectory() );

            File mxml = new File( testClasses, "com_adobe_example_TestCalculator_Flexmojos_test.mxml" );
View Full Code Here

    private void validateReport( File reportFile, int expectedNumTests, int expectedNumErrors, int expectedNumFailures )
        throws XmlPullParserException, IOException
    {
        AssertJUnit.assertTrue( "Report was not created!", reportFile.isFile() );

        TestCaseReport report = new TestCaseReport( Xpp3DomBuilder.build(new FileReader(reportFile)) );

        System.out.println("Report: Tests " + report.getTests() + " Errors " + report.getErrors() + " Failures " + report.getFailures());

        AssertJUnit.assertEquals( expectedNumErrors, report.getErrors() );
        AssertJUnit.assertEquals( expectedNumFailures, report.getFailures() );
        AssertJUnit.assertEquals( expectedNumTests, report.getTests() );
    }
View Full Code Here

    private void validateReport( File reportFile )
        throws XmlPullParserException, IOException, FileNotFoundException
    {
        AssertJUnit.assertTrue( "Report was not created!", reportFile.isFile() );

        TestCaseReport report = new TestCaseReport( Xpp3DomBuilder.build( new FileReader( reportFile ) ) );

        AssertJUnit.assertEquals( 0, report.getErrors() );
        AssertJUnit.assertEquals( 0, report.getFailures() );
        AssertJUnit.assertEquals( 1, report.getTests() );
    }
View Full Code Here

        try
        {
            List<String> results = runTest( testRequest );
            for ( String result : results )
            {
                TestCaseReport report = writeTestReport( result );
                if ( coverage )
                {
                    List<TestCoverageReport> coverageResult = report.getCoverage();
                    for ( TestCoverageReport testCoverageReport : coverageResult )
                    {
                        reporter.addResult( testCoverageReport.getClassname(), testCoverageReport.getTouchs() );
                    }
                }
View Full Code Here

TOP

Related Classes of net.flexmojos.oss.test.report.TestCaseReport

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.