public void reportRun(String testfile) { TestSuiteResults results = run(testfile); results.reportResults(); }
public void runTests(Vector<String> tests) { startReport(); for (String testfile : tests) { reportRun(testfile); } endReport(); }
public String serialize(XdmNode node) { String result = serializeAsXML(node); result = result.replace("&","&"); result = result.replace("<","<"); result = result.replace(">",">"); return result; }
XProcRuntime runtime = new XProcRuntime(config); RunTestReport test = new RunTestReport(runtime, new DefaultTestReporter(runtime)); test.runTests(tests); runtime.close();
XdmNode doc = builder.build(source); XdmNode root = S9apiUtils.getDocumentElement(doc); result = runTest(root); } catch (Exception sae) { result = new TestSuiteResult(turi.toASCIIString()); pipeoutputs = runPipe(t.pipeline.pipeline, t.inputs, t.outputs, t.parameters, t.options); } catch (XProcException xprocex) { if (t.error == null) { pipeoutputs = runPipe(compare.pipeline, cinputs, t.outputs, null, null); } catch (Exception err) { result.fail(err, "Compare pipelines failed: this shouldn't happen.");
XProcRuntime runtime = new XProcRuntime(config); RunTestReport test = new RunTestReport(runtime, new DefaultTestReporter(runtime)); test.runTests(tests); runtime.close();
XdmNode doc = builder.build(source); XdmNode root = S9apiUtils.getDocumentElement(doc); result = runTest(root); } catch (Exception sae) { result = new TestSuiteResult(turi.toASCIIString()); pipeoutputs = runPipe(t.pipeline.pipeline, t.inputs, t.outputs, t.parameters, t.options); } catch (XProcException xprocex) { if (t.error == null) { pipeoutputs = runPipe(compare.pipeline, cinputs, t.outputs, null, null); } catch (Exception err) { result.fail(err, "Compare pipelines failed: this shouldn't happen.");
public void runTests(Vector<String> tests) { startReport(); for (String testfile : tests) { reportRun(testfile); } endReport(); }
public void reportRun(String testfile) { TestSuiteResults results = run(testfile); results.reportResults(); }
public String serialize(XdmNode node) { String result = serializeAsXML(node); result = result.replace("&","&"); result = result.replace("<","<"); result = result.replace(">",">"); return result; }
public void runTest(String test) { RunTestReport.TestSuiteResults results = reporter.run(test); int pass = 0; int fail = 0; for (RunTestReport.TestSuiteResult result : results.getResults()) { if (result.passed()) { pass++; } else { fail++; result.report(); } } if (pass == 1 && fail == 0) { System.err.println("PASS " + test); return; } if (fail > 0) { if (pass == 0 && fail == 1) { System.err.println("FAIL " + test); throw new RuntimeException("Test failed"); } else { System.err.println("FAIL " + fail + "/" + (pass+fail) + " " + test); throw new RuntimeException("Some tests failed"); } } } }