01: package org.jzonic.webtester.writer;
02:
03: import java.util.List;
04:
05: import org.jzonic.webtester.WebTestResult;
06: import org.jzonic.webtester.WebTestSuiteResult;
07:
08: /**
09: * This class will write the result of a testcase or a testsuite
10: * to the console.
11: *
12: * @author Mecky
13: */
14: public class WebTestResultConsoleWriter extends
15: AbstractWebTestResultWriter {
16:
17: public WebTestResultConsoleWriter() {
18:
19: }
20:
21: public void generateResult(WebTestResult result) {
22: System.out.println(generateTestResult(result));
23: }
24:
25: public void generateResult(WebTestSuiteResult suiteResult) {
26: String header = generateSuiteHeader(suiteResult);
27: System.out.println(header);
28: List results = suiteResult.getTestResults();
29: for (int i = 0; i < results.size(); i++) {
30: WebTestResult result = (WebTestResult) results.get(i);
31: generateResult(result);
32: }
33:
34: }
35:
36: }
|