diff options
author | Jesse Hallett <jesse@galois.com> | 2014-01-03 13:26:24 -0800 |
---|---|---|
committer | Jesse Hallett <jesse@galois.com> | 2014-01-03 15:55:16 -0800 |
commit | eee8ee81c683169914ed9dd8f6c514eab7811214 (patch) | |
tree | 5311b92fb638368f2a43857d0a2fd5d0c36e7852 /src/batchtools/headless/src/test/java/com | |
parent | 6d63c61bb97591c0e97f00e606468754f6180b80 (diff) |
Outputs message, xpath, and proper severity in batch run reports
Result extracts xpath from problem report
Retrieves msg and xpath from problem report
got severity working
Diffstat (limited to 'src/batchtools/headless/src/test/java/com')
-rw-r--r-- | src/batchtools/headless/src/test/java/com/galois/fiveui/ReporterTest.java | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/batchtools/headless/src/test/java/com/galois/fiveui/ReporterTest.java b/src/batchtools/headless/src/test/java/com/galois/fiveui/ReporterTest.java index b30d331..9e6a4af 100644 --- a/src/batchtools/headless/src/test/java/com/galois/fiveui/ReporterTest.java +++ b/src/batchtools/headless/src/test/java/com/galois/fiveui/ReporterTest.java @@ -35,9 +35,9 @@ public class ReporterTest { @Test public void testConstructor() { ImmutableList<Result> r = ImmutableList.of( - new Result(ResType.Pass, (WebDriver) null, "OK", "http://nonexistant", "test rule 1", "a desc or test rule 1", "problem!"), - new Result(ResType.Pass, (WebDriver) null, "OK", "http://intransigent", "test rule 1", "a desc or test rule 1", "problem!"), - new Result(ResType.Error, (WebDriver) null, "ERROR", "http://nonexistant", "test rule 2", "a desc or test rule 1", "problem!")); + new Result(ResType.Pass, (WebDriver) null, "OK", null, "http://nonexistant", "test rule 1", "a desc or test rule 1", "problem!"), + new Result(ResType.Pass, (WebDriver) null, "OK", null, "http://intransigent", "test rule 1", "a desc or test rule 1", "problem!"), + new Result(ResType.Error, (WebDriver) null, "ERROR", null, "http://nonexistant", "test rule 2", "a desc or test rule 1", "problem!")); Reporter kermit = new Reporter(r); System.out.println("Summary page size: " + kermit.getSummary().length() + " bytes"); System.out.println("Summary page size: " + kermit.getByURL().length() + " bytes"); @@ -53,19 +53,19 @@ public class ReporterTest { //File tmpPath = new File("/tmp/"); System.out.println("Writing test summary page to: " + tmpPath.toString() + File.separator); ImmutableList<Result> r = ImmutableList.of( - new Result(ResType.Pass, (WebDriver) null, "OK", "http://nonexistant", "test rule 1", "a desc or test rule 1", "problem!"), - new Result(ResType.Pass, (WebDriver) null, "OK", "http://intransigent", "test rule 1", "a desc or test rule 1", "problem!"), - new Result(ResType.Pass, (WebDriver) null, "OK", "http://intransigent", "test rule 3", "a desc or test rule 1", "problem!"), - new Result(ResType.Pass, (WebDriver) null, "OK", "http://intransigent", "test rule 4", "a desc or test rule 1", "problem!"), - new Result(ResType.Pass, (WebDriver) null, "OK", "http://intransigent", "test rule 5", "a desc or test rule 1", "problem!"), - new Result(ResType.Pass, (WebDriver) null, "OK", "http://foo.com", "test rule 1", "a desc or test rule 1", "problem!"), - new Result(ResType.Error, (WebDriver) null, "ERROR", "http://foo.com", "test rule 5", "a desc or test rule 1", "problem!"), - new Result(ResType.Error, (WebDriver) null, "ERROR", "http://foo.com", "test rule 2", "a desc or test rule 1", "problem!"), - new Result(ResType.Error, (WebDriver) null, "ERROR", "http://bar.com", "test rule 3", "a desc or test rule 1", "problem!"), - new Result(ResType.Error, (WebDriver) null, "ERROR", "http://bar.com", "test rule 3", "a desc or test rule 1", "problem!"), // multiple fails for same url+rule combo - new Result(ResType.Error, (WebDriver) null, "ERROR", "http://bar.com", "test rule 3", "a desc or test rule 1", "problem!"), - new Result(ResType.Error, (WebDriver) null, "ERROR", "http://bar.com", "test rule 3", "a desc or test rule 1", "problem!"), - new Result(ResType.Error, (WebDriver) null, "ERROR", "http://nonexistant", "test rule 2", "a desc or test rule 1", "problem!")); + new Result(ResType.Pass, (WebDriver) null, "OK", null, "http://nonexistant", "test rule 1", "a desc or test rule 1", "problem!"), + new Result(ResType.Pass, (WebDriver) null, "OK", null, "http://intransigent", "test rule 1", "a desc or test rule 1", "problem!"), + new Result(ResType.Pass, (WebDriver) null, "OK", null, "http://intransigent", "test rule 3", "a desc or test rule 1", "problem!"), + new Result(ResType.Pass, (WebDriver) null, "OK", null, "http://intransigent", "test rule 4", "a desc or test rule 1", "problem!"), + new Result(ResType.Pass, (WebDriver) null, "OK", null, "http://intransigent", "test rule 5", "a desc or test rule 1", "problem!"), + new Result(ResType.Pass, (WebDriver) null, "OK", null, "http://foo.com", "test rule 1", "a desc or test rule 1", "problem!"), + new Result(ResType.Error, (WebDriver) null, "ERROR", null, "http://foo.com", "test rule 5", "a desc or test rule 1", "problem!"), + new Result(ResType.Error, (WebDriver) null, "ERROR", null, "http://foo.com", "test rule 2", "a desc or test rule 1", "problem!"), + new Result(ResType.Error, (WebDriver) null, "ERROR", null, "http://bar.com", "test rule 3", "a desc or test rule 1", "problem!"), + new Result(ResType.Error, (WebDriver) null, "ERROR", null, "http://bar.com", "test rule 3", "a desc or test rule 1", "problem!"), // multiple fails for same url+rule combo + new Result(ResType.Error, (WebDriver) null, "ERROR", null, "http://bar.com", "test rule 3", "a desc or test rule 1", "problem!"), + new Result(ResType.Error, (WebDriver) null, "ERROR", null, "http://bar.com", "test rule 3", "a desc or test rule 1", "problem!"), + new Result(ResType.Error, (WebDriver) null, "ERROR", null, "http://nonexistant", "test rule 2", "a desc or test rule 1", "problem!")); Reporter kermit = new Reporter(r); kermit.writeReportsToDir(tmpPath.toString()); assertTrue("made it!", true); |