aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-scanner-engine/src/main/java/org
diff options
context:
space:
mode:
authorJulien HENRY <julien.henry@sonarsource.com>2016-10-21 17:49:06 +0200
committerJulien HENRY <henryju@yahoo.fr>2016-10-24 10:49:05 +0200
commit13e4562536570e5f0b2691c8aa09ae14ed4a3f0a (patch)
tree29d1859e0ecc912e024db94f0bc61bdc2563dc86 /sonar-scanner-engine/src/main/java/org
parentf6f56de1f35c7559242381b8ea95cc72f8647ce8 (diff)
downloadsonarqube-13e4562536570e5f0b2691c8aa09ae14ed4a3f0a.tar.gz
sonarqube-13e4562536570e5f0b2691c8aa09ae14ed4a3f0a.zip
SONAR-8314 Add medium tests for generic test execution report
Diffstat (limited to 'sonar-scanner-engine/src/main/java/org')
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/genericcoverage/GenericTestExecutionReportParser.java2
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/mediumtest/TaskResult.java2
2 files changed, 2 insertions, 2 deletions
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/genericcoverage/GenericTestExecutionReportParser.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/genericcoverage/GenericTestExecutionReportParser.java
index 2762ec37506..0a30a5c8a85 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/genericcoverage/GenericTestExecutionReportParser.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/genericcoverage/GenericTestExecutionReportParser.java
@@ -135,12 +135,12 @@ public class GenericTestExecutionReportParser {
} else if (ERROR.equals(elementName)) {
status = TestCase.Status.ERROR;
}
- testCase.setStatus(status);
if (TestCase.Status.OK != status) {
testCase.setMessage(mandatoryAttribute(child, MESSAGE_ATTR));
testCase.setStackTrace(child.collectDescendantText());
}
}
+ testCase.setStatus(status);
}
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/mediumtest/TaskResult.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/mediumtest/TaskResult.java
index e15e7030e1b..879e4a016fd 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/mediumtest/TaskResult.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/mediumtest/TaskResult.java
@@ -259,7 +259,7 @@ public class TaskResult implements org.sonar.scanner.mediumtest.ScanTaskObserver
return null;
}
- public ScannerReport.Test testExecutionFor(InputFile testFile, String testName) {
+ public ScannerReport.Test firstTestExecutionForName(InputFile testFile, String testName) {
int ref = reportComponents.get(((DefaultInputFile) testFile).key()).getRef();
try (InputStream inputStream = FileUtils.openInputStream(getReportReader().readTests(ref))) {
ScannerReport.Test test = ScannerReport.Test.parser().parseDelimitedFrom(inputStream);