Package gnu.testlet.runner

Examples of gnu.testlet.runner.RunResult


    private final List systemProperties = new ArrayList();
    private final String result1Name;
    private final String result2Name;
   
    RunComparison(RunResult result1, RunResult result2) {
        super(new RunResult("Comparison of '" + result1.getName() + "' and '" + result2.getName() + "'"));
        result1Name = result1.getName();
        result2Name = result2.getName();
    }
View Full Code Here


            Run latestRun = Run.getLatest(config);
            Run newRun = Run.create(config);
           
            List<String> workingList = new ArrayList<String>();
            List<String> crashingList = new ArrayList<String>();
            RunResult runResult;
           
            if (latestRun == null) {
                LOGGER.info("running list of all tests");
                runResult = runTests(null, true, workingList, crashingList, newRun.getTimestampString());
                runResult.setSystemProperty("jtestserver.process", vmType);

            } else {
                LOGGER.info("running list of working tests");
                File workingTests = latestRun.getWorkingTests();
                runResult = runTests(workingTests, true, workingList, crashingList, newRun.getTimestampString());
                runResult.setSystemProperty("jtestserver.process", vmType);
               
                LOGGER.info("running list of crashing tests");
                File crashingTests = latestRun.getCrashingTests();
                RunResult rr = runTests(crashingTests, false, workingList, crashingList,
                        newRun.getTimestampString());
                mergeResults(runResult, rr);
            }
           
            LOGGER.info("writing crashing & working tests lists");
View Full Code Here

   
    private void compareRuns(Run latestRun, Run newRun, RunResult newRunResult) throws XMLParseException, IOException {
        if ((latestRun != null) && latestRun.getReportXml().exists()) {
            // there was a previous run, let do the comparison !
           
            RunResult latestRunResult = new XMLReportParser().parse(latestRun.getReportXml());
           
            ReportComparator comparator = new ReportComparator(latestRunResult, newRunResult);
            RunComparison comparison = comparator.compare();
           
            // write comparison in html format
View Full Code Here

           
            LOGGER.info("adding test " + test);           
            testManager.runTest(test);
        }

        RunResult result = new RunResult(timestamp);
        boolean firstTest = true;
        while (testManager.hasPendingTests()) {
            boolean working = false;
            RunResult delta = null;
            String test = null;
           
            try {
                LOGGER.info("getting a result");
                Result runnerResult = testManager.getResult();
                delta = runnerResult.getRunResult();
                test = runnerResult.getTest();
                LOGGER.info("got a result for " + test);
                mergeResults(result, delta);
               
                working = true;
            } finally {
                if (working) {
                    workingList.add(test);
                } else {
                    crashingList.add(test);
                }
               
                if (firstTest && (delta != null)) {
                    for (String name : delta.getSystemPropertyNames()) {
                        result.setSystemProperty(name, delta.getSystemProperty(name));
                    }
                   
                    firstTest = false;
                }
            }
View Full Code Here

    public void runTest(String test) throws ProtocolException, IOException {
       
        LOGGER.info("running test " + test);
       
        try {
            RunResult delta = client.runMauveTest(test);
            results.add(new Result(test, delta));
        } catch (TimeoutException e) {
            LOGGER.log(Level.SEVERE, "a timeout happened", e);
        }
    }
View Full Code Here

   
    @Override
    public RunResult runTest(String test) throws TestFailureException {
        status = status.RUNNING;
        JTSMauve m = new JTSMauve();
        RunResult result = m.runTest(test);
        status = Status.READY;
       
        return result;
    }
View Full Code Here

    private class JTSMauve extends Mauve {
        public RunResult runTest(String testName) {
            // save the default locale, some tests change the default
            Locale savedLocale = Locale.getDefault();
           
            result = new RunResult("Mauve Test Run");
            addSystemProperties(result);
            currentCheck = new CheckResult(0, false);

            executeLine("", testName);
           
View Full Code Here

        String test = (String) params[0];
        LOGGER.finer("running test " + test);
       
        MauveTestRunner runner = MauveTestRunner.getInstance();
        try {
            RunResult runResult = runner.runTest(test);
            StringWriter sw = new StringWriter();
            PrintWriter pw = new PrintWriter(sw);
            pw.write("<?xml version=\"1.0\" encoding=\"UTF-16\"?>");
            new XMLReportWriter(true).write(runResult, pw);
            result = sw.getBuffer().toString();
View Full Code Here

   
    @Test   
    public void testRunTest() throws IOException {
        MauveTestRunner runner = MauveTestRunner.getInstance();
        try {
            RunResult result = runner.runTest(MAUVE_TEST);
            assertNotNull(result);
        } catch (TestFailureException e) {
            fail(e.getMessage());
        }
    }
View Full Code Here

            }
        } .runTest(MAUVE_TEST);
       
        assertNotNull(xmlReport);
       
        RunResult result = new DefaultTestClient(null) {
            public RunResult parseReport() throws ProtocolException {
                return parseMauveReport(xmlReport);
            }
        } .parseReport();
        assertNotNull(result);
View Full Code Here

TOP

Related Classes of gnu.testlet.runner.RunResult

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.