aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-scanner-protocol
diff options
context:
space:
mode:
authorJulien HENRY <julien.henry@sonarsource.com>2016-10-17 16:31:39 +0200
committerJulien HENRY <julien.henry@sonarsource.com>2016-10-18 16:00:26 +0200
commitb0d4220a7e1b2c53dfd5b8da118a1829039ce44b (patch)
treefbdcc3cdfe974a260628011e8eb90ed2f363f2c5 /sonar-scanner-protocol
parentf21abcbb8250053703ce6edc36bfea03bb3665e7 (diff)
downloadsonarqube-b0d4220a7e1b2c53dfd5b8da118a1829039ce44b.tar.gz
sonarqube-b0d4220a7e1b2c53dfd5b8da118a1829039ce44b.zip
SONAR-8284 Remove overall/IT coverage data from scanner report
Diffstat (limited to 'sonar-scanner-protocol')
-rw-r--r--sonar-scanner-protocol/src/main/protobuf/scanner_report.proto22
-rw-r--r--sonar-scanner-protocol/src/test/java/org/sonar/scanner/protocol/output/ScannerReportReaderTest.java21
-rw-r--r--sonar-scanner-protocol/src/test/java/org/sonar/scanner/protocol/output/ScannerReportWriterTest.java7
3 files changed, 13 insertions, 37 deletions
diff --git a/sonar-scanner-protocol/src/main/protobuf/scanner_report.proto b/sonar-scanner-protocol/src/main/protobuf/scanner_report.proto
index f0ab94c1e2a..1c4c2752427 100644
--- a/sonar-scanner-protocol/src/main/protobuf/scanner_report.proto
+++ b/sonar-scanner-protocol/src/main/protobuf/scanner_report.proto
@@ -217,24 +217,12 @@ message LineCoverage {
// Number of conditions to cover (if set, the value must be greater than 0)
int32 conditions = 2;
// Is the line has been touched by a unit test ? Returning false means that no test has touched this executable line.
- oneof has_ut_hits {
- bool ut_hits = 3;
+ oneof has_hits {
+ bool hits = 3;
}
- // Is the line has been touched by a integration test ? Returning false means that no test has touched this executable line.
- oneof has_it_hits {
- bool it_hits = 4;
- }
- // Number of conditions covered by unit tests
- oneof has_ut_covered_conditions {
- int32 ut_covered_conditions = 5;
- }
- // Number of conditions covered by integration tests
- oneof has_it_covered_conditions {
- int32 it_covered_conditions = 6;
- }
- // Number of conditions covered by overall tests
- oneof has_overall_covered_conditions {
- int32 overall_covered_conditions = 7;
+ // Number of conditions covered by tests
+ oneof has_covered_conditions {
+ int32 covered_conditions = 5;
}
}
diff --git a/sonar-scanner-protocol/src/test/java/org/sonar/scanner/protocol/output/ScannerReportReaderTest.java b/sonar-scanner-protocol/src/test/java/org/sonar/scanner/protocol/output/ScannerReportReaderTest.java
index 98b7c7ac71d..5a5c5323caf 100644
--- a/sonar-scanner-protocol/src/test/java/org/sonar/scanner/protocol/output/ScannerReportReaderTest.java
+++ b/sonar-scanner-protocol/src/test/java/org/sonar/scanner/protocol/output/ScannerReportReaderTest.java
@@ -277,20 +277,14 @@ public class ScannerReportReaderTest {
ScannerReport.LineCoverage.newBuilder()
.setLine(1)
.setConditions(1)
- .setUtHits(true)
- .setItHits(false)
- .setUtCoveredConditions(1)
- .setItCoveredConditions(1)
- .setOverallCoveredConditions(1)
+ .setHits(true)
+ .setCoveredConditions(1)
.build(),
ScannerReport.LineCoverage.newBuilder()
.setLine(2)
.setConditions(5)
- .setUtHits(false)
- .setItHits(false)
- .setUtCoveredConditions(4)
- .setItCoveredConditions(5)
- .setOverallCoveredConditions(5)
+ .setHits(false)
+ .setCoveredConditions(4)
.build()));
underTest = new ScannerReportReader(dir);
@@ -298,11 +292,8 @@ public class ScannerReportReaderTest {
ScannerReport.LineCoverage coverage = it.next();
assertThat(coverage.getLine()).isEqualTo(1);
assertThat(coverage.getConditions()).isEqualTo(1);
- assertThat(coverage.getUtHits()).isTrue();
- assertThat(coverage.getItHits()).isFalse();
- assertThat(coverage.getUtCoveredConditions()).isEqualTo(1);
- assertThat(coverage.getItCoveredConditions()).isEqualTo(1);
- assertThat(coverage.getOverallCoveredConditions()).isEqualTo(1);
+ assertThat(coverage.getHits()).isTrue();
+ assertThat(coverage.getCoveredConditions()).isEqualTo(1);
}
}
diff --git a/sonar-scanner-protocol/src/test/java/org/sonar/scanner/protocol/output/ScannerReportWriterTest.java b/sonar-scanner-protocol/src/test/java/org/sonar/scanner/protocol/output/ScannerReportWriterTest.java
index c55abc01c9b..2bd380d55b5 100644
--- a/sonar-scanner-protocol/src/test/java/org/sonar/scanner/protocol/output/ScannerReportWriterTest.java
+++ b/sonar-scanner-protocol/src/test/java/org/sonar/scanner/protocol/output/ScannerReportWriterTest.java
@@ -272,11 +272,8 @@ public class ScannerReportWriterTest {
ScannerReport.LineCoverage.newBuilder()
.setLine(1)
.setConditions(1)
- .setUtHits(true)
- .setItHits(false)
- .setUtCoveredConditions(1)
- .setItCoveredConditions(1)
- .setOverallCoveredConditions(1)
+ .setHits(true)
+ .setCoveredConditions(1)
.build()));
assertThat(underTest.hasComponentData(FileStructure.Domain.COVERAGES, 1)).isTrue();