提交 978ddf3b 编写于 作者: J jglick

[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
上级 9ea7ab43
......@@ -186,6 +186,7 @@ public final class CaseResult extends TestObject implements Comparable<CaseResul
* If this test failed, then return the build number
* when this test started failing.
*/
@Exported
public int getFailedSince() {
return failedSince;
}
......@@ -225,30 +226,6 @@ public final class CaseResult extends TestObject implements Comparable<CaseResul
return errorDetails;
}
/**
* The stdout of this test. Note that due to the design of the format,
* stdout for the entire {@link SuiteResult} is reported,
* and Hudson cannot tell what portion of the output corresponds to this test.
*
* @since 1.272
*/
@Exported
public String getStdout() {
return parent.getStdout();
}
/**
* The stderr of this test. Note that due to the design of the format,
* stdout for the entire {@link SuiteResult} is reported,
* and Hudson cannot tell what portion of the output corresponds to this test.
*
* @since 1.272
*/
@Exported
public String getStderr() {
return parent.getStderr();
}
/**
* @return true if the test was not skipped and did not fail, false otherwise.
*/
......@@ -262,6 +239,7 @@ public final class CaseResult extends TestObject implements Comparable<CaseResul
* been configured to be skipped.
* @return true if the test was not executed, false otherwise.
*/
@Exported
public boolean isSkipped() {
return skipped;
}
......
......@@ -139,11 +139,25 @@ public final class SuiteResult implements Serializable {
return duration;
}
/**
* The stdout of this test. Note that due to the design of the format,
* stdout for the entire {@link SuiteResult} is reported,
* and Hudson cannot tell what portion of the output corresponds to this test.
*
* @since 1.281
*/
@Exported
public String getStdout() {
return stdout;
}
/**
* The stderr of this test. Note that due to the design of the format,
* stdout for the entire {@link SuiteResult} is reported,
* and Hudson cannot tell what portion of the output corresponds to this test.
*
* @since 1.281
*/
@Exported
public String getStderr() {
return stderr;
......@@ -158,7 +172,7 @@ public final class SuiteResult implements Serializable {
return timestamp;
}
@Exported
@Exported(inline=true)
public List<CaseResult> getCases() {
return cases;
}
......
......@@ -203,11 +203,15 @@ public final class TestResult extends MetaTabulatedResult {
}
@Override
@Exported(name="child",inline=true)
public Collection<PackageResult> getChildren() {
return byPackages.values();
}
@Exported(inline=true)
public Collection<SuiteResult> getSuites() {
return suites;
}
@Override
public String getName() {
return "";
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册