From 978ddf3bd2d144025fe2a092111ceece120fc824 Mon Sep 17 00:00:00 2001 From: jglick Date: Thu, 5 Feb 2009 22:57:54 +0000 Subject: [PATCH] [FIXED HUDSON-2760] Rearranging /testReport/api/xml to be more like junitResult.xml. Now groups results into suites, then cases. A suite has a name, which is usually - but not always - identical to the class name of its cases. (If you have static Test suite() methods, then it could be different.) stdout/stderr is associated with a suite. (JUnit does not record which case produced stdio.) Also exporting failedSince and skipped attrs. junitResult.xml is similar, but does not represent FAILED vs. REGRESSION or age (does have failedSince). Prior fixes failed to export stdout/stderr, and in fact made case details invisible. git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@15045 71c3de6d-444a-0410-be80-ed276b4c234a --- .../java/hudson/tasks/junit/CaseResult.java | 26 ++----------------- .../java/hudson/tasks/junit/SuiteResult.java | 16 +++++++++++- .../java/hudson/tasks/junit/TestResult.java | 6 ++++- 3 files changed, 22 insertions(+), 26 deletions(-) diff --git a/core/src/main/java/hudson/tasks/junit/CaseResult.java b/core/src/main/java/hudson/tasks/junit/CaseResult.java index b69213be29..40cc39be72 100644 --- a/core/src/main/java/hudson/tasks/junit/CaseResult.java +++ b/core/src/main/java/hudson/tasks/junit/CaseResult.java @@ -186,6 +186,7 @@ public final class CaseResult extends TestObject implements Comparable getCases() { return cases; } diff --git a/core/src/main/java/hudson/tasks/junit/TestResult.java b/core/src/main/java/hudson/tasks/junit/TestResult.java index 99ecc34e56..53befdfd7b 100644 --- a/core/src/main/java/hudson/tasks/junit/TestResult.java +++ b/core/src/main/java/hudson/tasks/junit/TestResult.java @@ -203,11 +203,15 @@ public final class TestResult extends MetaTabulatedResult { } @Override - @Exported(name="child",inline=true) public Collection getChildren() { return byPackages.values(); } + @Exported(inline=true) + public Collection getSuites() { + return suites; + } + @Override public String getName() { return "";