export test results: remember location url if provided (import from file)

This commit is contained in:
Anna Kozlova
2015-06-23 12:05:01 +03:00
parent aee6d030de
commit 648c803b20
3 changed files with 11 additions and 1 deletions
@@ -642,7 +642,7 @@ public class SMTestProxy extends AbstractTestProxy {
}
@Nullable
protected String getLocationUrl() {
public String getLocationUrl() {
return myLocationUrl;
}
@@ -143,6 +143,11 @@ public abstract class AbstractTestProxy extends CompositePrintable {
return null;
}
@Nullable
public String getLocationUrl() {
return null;
}
@Deprecated
public interface AssertEqualsDiffChain {
DiffHyperlink getPrevious();
@@ -42,6 +42,7 @@ public class TestResultsXmlFormatter {
private static final String ELEM_SUITE = "suite";
private static final String ATTR_NAME = "name";
private static final String ATTR_DURATION = "duration";
private static final String ATTR_LOCATION = "locationUrl";
private static final String ELEM_COUNT = "count";
private static final String ATTR_VALUE = "value";
private static final String ELEM_OUTPUT = "output";
@@ -136,6 +137,10 @@ public class TestResultsXmlFormatter {
if (duration != null) {
attrs.put(ATTR_DURATION, String.valueOf(duration));
}
String locationUrl = node.getLocationUrl();
if (locationUrl != null) {
attrs.put(ATTR_LOCATION, locationUrl);
}
String elemName = node.isLeaf() ? ELEM_TEST : ELEM_SUITE;
startElement(elemName, attrs);
if (node.isLeaf()) {