From daaa7abd91ff8ae12e0b1835045489acbda0539f Mon Sep 17 00:00:00 2001 From: J08nY Date: Sun, 5 Nov 2017 16:48:30 +0100 Subject: Implement Result.ExpectedValue to add more logic to test evaluation. - Introduces a new enum Result.ExpectedValue, which is used to signify what Test results are expected. - Changes the Result.Value enum to contain information about what was expected. It gains more values: - UXSUCCESS -> Unexpected success. - XFAILURE -> Expected failure. The values SUCCESS and XFAILURE are the OK, values. - Creates a hierarchy of evaluating Responses, Simple tests and Compoung tests. Simple test evaluates the OK property of the response object (using .successfull() method) and again exposes its OK property which depends on the tests ExpectedValue and the response success. Compound test evaluates the OK property of the Simple tests it contains (using the .ok() method) and again exposes its OK property which depends on the concrete Compound test variant, but involves some ExpectedValues and the success of the individual Simple tests it contains. --- src/cz/crcs/ectester/reader/output/XMLTestWriter.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/cz/crcs/ectester/reader/output/XMLTestWriter.java') diff --git a/src/cz/crcs/ectester/reader/output/XMLTestWriter.java b/src/cz/crcs/ectester/reader/output/XMLTestWriter.java index b4accdd..709d215 100644 --- a/src/cz/crcs/ectester/reader/output/XMLTestWriter.java +++ b/src/cz/crcs/ectester/reader/output/XMLTestWriter.java @@ -107,10 +107,13 @@ public class XMLTestWriter implements TestWriter { testElem.appendChild(description); Element result = doc.createElement("result"); + Element ok = doc.createElement("ok"); + ok.setTextContent(String.valueOf(t.ok())); Element value = doc.createElement("value"); value.setTextContent(t.getResultValue().name()); Element cause = doc.createElement("cause"); cause.setTextContent(t.getResultCause()); + result.appendChild(ok); result.appendChild(value); result.appendChild(cause); testElem.appendChild(result); -- cgit v1.2.3-70-g09d2