Package junit.framework

Examples of junit.framework.TestResult.errorCount()


        test.run(result);
        if (result.failureCount() != 0) {
            Enumeration e = result.failures();
            return ((TestFailure)e.nextElement()).thrownException();
        }
        else if (result.errorCount() != 0) {
            Enumeration e = result.errors();
            return ((TestFailure)e.nextElement()).thrownException();
        }
        return null;
    }
View Full Code Here


        test.run(result);
        if (result.failureCount() != 0) {
            Enumeration e = result.failures();
            return ((TestFailure)e.nextElement()).thrownException();
        }
        else if (result.errorCount() != 0) {
            Enumeration e = result.errors();
            return ((TestFailure)e.nextElement()).thrownException();
        }
        return null;
    }
View Full Code Here

                System.out.println("Tests run: "
                        + tr.runCount()
                        + ", Failures: "
                        + tr.failureCount()
                        + ", Errors: "
                        + tr.errorCount()
                        + ", Time elapsed: "
                        + report.elapsedTimeAsString(report.m_endTime
                                - report.m_endTime) + " sec");
            } else {
                System.out.println("Tests run: "
View Full Code Here

                System.out.println("Tests run: "
                        + tr.runCount()
                        + ", Failures: "
                        + tr.failureCount()
                        + ", Errors: "
                        + tr.errorCount()
                        + ", Time elapsed: "
                        + report.elapsedTimeAsString(report.m_endTime
                                - report.m_endTime) + " sec <<< FAILURE!");
                if (tr.errorCount() > 0) {
                    m_errors.add(tr);
View Full Code Here

                        + ", Errors: "
                        + tr.errorCount()
                        + ", Time elapsed: "
                        + report.elapsedTimeAsString(report.m_endTime
                                - report.m_endTime) + " sec <<< FAILURE!");
                if (tr.errorCount() > 0) {
                    m_errors.add(tr);
                }
                if (tr.failureCount() > 0) {
                    m_failures.add(tr);
                }
View Full Code Here

                }
            }

            m_total += tr.runCount();
            m_totalFailures += tr.failureCount();
            m_totalErrors += tr.errorCount();

            report.generateReport(test, tr, m_reportsDirectory, bc, felixConf);

        } catch (Exception e) {
            getLog().error(e);
View Full Code Here

        try {
            OzoneTestRunner runner = new OzoneTestRunner(args);
            TestResult result = runner.doRun();
            fLog.info("run: " + result.runCount()
                      + " error: " + result.errorCount()
                      + " failure: " + result.failureCount());
        } catch (Exception e) {
            fLog.error("run fails", e);
        }
    }
View Full Code Here

     * @see org.codehaus.castor.maven.xmlctf.AbstractTestSuiteMojo#runJUnit(junit.framework.Test)
     */
    public void runJUnit(Test testSuite) throws MojoExecutionException {
        TestResult result = TestRunner.run(testSuite);

        if (result.errorCount() > 0 || result.failureCount() > 0) {
            throw new MojoExecutionException(
                    "Errors or Failures occured testing the MasterTestSuite!");
        }
    }

View Full Code Here

    public static void main(String [] args) {
        TestResult tr = new TestResult();
        Test t = suite();
        t.run(tr);
        System.out.println(tr.errorCount());
        Enumeration e = tr.failures();
        while (e.hasMoreElements()) {
            ((TestFailure)e.nextElement ()).thrownException().printStackTrace();
        }
        System.out.println(tr.failureCount());
View Full Code Here

    @After
    public void performCleanupActions() {
        TestResult result = new TestResult();
        performCleanupActions(cleanupActions, result);
        if (result.errorCount() > 0) {
            fail(createFailureMessage(result));
        }
    }

    @After
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.