From c86195fe352d85e3145b5e3545e59744c9415526 Mon Sep 17 00:00:00 2001 From: Nikita Tkachenko Date: Fri, 12 Jul 2024 14:01:47 +0200 Subject: [PATCH] Replace segments with bitmaps in per-test code coverage --- .../coverage/file/FileCoverageStore.java | 2 +- .../coverage/line/LineCoverageStore.java | 50 ++------- .../coverage/line/SourceAnalyzer.java | 22 ++-- .../test-efd-known-test/coverages.ftl | 5 +- .../coverages.ftl | 26 ++--- .../coverages.ftl | 26 ++--- .../test-efd-new-slow-test/coverages.ftl | 8 +- .../resources/test-efd-new-test/coverages.ftl | 11 +- .../test/resources/test-failure/coverages.ftl | 5 +- .../coverages.ftl | 8 +- .../coverages.ftl | 8 +- .../test-retry-failure/coverages.ftl | 17 ++- .../coverages.ftl | 26 ++--- .../coverages.ftl | 14 +-- .../test-scenario-outline-5.4.0/coverages.ftl | 14 +-- .../coverages.ftl | 14 +-- .../test/resources/test-succeed/coverages.ftl | 5 +- .../test-efd-known-test/coverages.ftl | 5 +- .../coverages.ftl | 26 ++--- .../coverages.ftl | 26 ++--- .../test-efd-new-slow-test/coverages.ftl | 8 +- .../resources/test-efd-new-test/coverages.ftl | 11 +- .../coverages.ftl | 20 ++-- .../coverages.ftl | 20 ++-- .../test-failed-then-succeed/coverages.ftl | 11 +- .../test/resources/test-failed/coverages.ftl | 5 +- .../resources/test-parallel/coverages.ftl | 8 +- .../resources/test-retry-failed/coverages.ftl | 17 ++- .../test-scenario-outline-5.4.0/coverages.ftl | 14 +-- .../coverages.ftl | 14 +-- .../test/resources/test-skipped/coverages.ftl | 5 +- .../test/resources/test-succeed/coverages.ftl | 5 +- .../test-succeed-junit-5/coverages.ftl | 4 +- .../coverages.ftl | 10 +- .../coverages.ftl | 4 +- .../coverages.ftl | 4 +- .../coverages.ftl | 20 ++-- .../test_successful_maven_run/coverages.ftl | 4 +- .../coverages.ftl | 6 +- .../coverages.ftl | 4 +- .../coverages.ftl | 3 +- .../coverages.ftl | 5 +- .../coverages.ftl | 4 +- .../writer/ddintake/CiTestCovMapperV2.java | 23 ++-- .../ddintake/CiTestCovMapperV2Test.groovy | 101 +++++++++--------- internal-api/build.gradle | 1 - .../coverage/TestReportFileEntry.java | 76 ++----------- 47 files changed, 258 insertions(+), 467 deletions(-) diff --git a/dd-java-agent/agent-ci-visibility/src/main/java/datadog/trace/civisibility/coverage/file/FileCoverageStore.java b/dd-java-agent/agent-ci-visibility/src/main/java/datadog/trace/civisibility/coverage/file/FileCoverageStore.java index f84ef37d3bc..a825e2d7973 100644 --- a/dd-java-agent/agent-ci-visibility/src/main/java/datadog/trace/civisibility/coverage/file/FileCoverageStore.java +++ b/dd-java-agent/agent-ci-visibility/src/main/java/datadog/trace/civisibility/coverage/file/FileCoverageStore.java @@ -86,7 +86,7 @@ protected TestReport report( List fileEntries = new ArrayList<>(coveredPaths.size()); for (String path : coveredPaths) { - fileEntries.add(new TestReportFileEntry(path, Collections.emptyList())); + fileEntries.add(new TestReportFileEntry(path, null)); } TestReport report = new TestReport(testSessionId, testSuiteId, testSpanId, fileEntries); diff --git a/dd-java-agent/agent-ci-visibility/src/main/java/datadog/trace/civisibility/coverage/line/LineCoverageStore.java b/dd-java-agent/agent-ci-visibility/src/main/java/datadog/trace/civisibility/coverage/line/LineCoverageStore.java index 5199debbf19..e1bf1677a2a 100644 --- a/dd-java-agent/agent-ci-visibility/src/main/java/datadog/trace/civisibility/coverage/line/LineCoverageStore.java +++ b/dd-java-agent/agent-ci-visibility/src/main/java/datadog/trace/civisibility/coverage/line/LineCoverageStore.java @@ -13,9 +13,8 @@ import datadog.trace.civisibility.source.Utils; import java.io.InputStream; import java.util.ArrayList; +import java.util.BitSet; import java.util.Collection; -import java.util.Collections; -import java.util.Comparator; import java.util.HashMap; import java.util.HashSet; import java.util.IdentityHashMap; @@ -68,7 +67,7 @@ protected TestReport report( return null; } - Map> segmentsBySourcePath = new HashMap<>(); + Map coveredLinesBySourcePath = new HashMap<>(); for (Map.Entry, ExecutionDataAdapter> e : combinedExecutionData.entrySet()) { ExecutionDataAdapter executionDataAdapter = e.getValue(); String className = executionDataAdapter.getClassName(); @@ -84,15 +83,14 @@ protected TestReport report( } try (InputStream is = Utils.getClassStream(clazz)) { - List segments = - segmentsBySourcePath.computeIfAbsent(sourcePath, key -> new ArrayList<>()); - + BitSet coveredLines = + coveredLinesBySourcePath.computeIfAbsent(sourcePath, key -> new BitSet()); ExecutionDataStore store = new ExecutionDataStore(); store.put(executionDataAdapter.toExecutionData()); // TODO optimize this part to avoid parsing // the same class multiple times for different test cases - Analyzer analyzer = new Analyzer(store, new SourceAnalyzer(segments)); + Analyzer analyzer = new Analyzer(store, new SourceAnalyzer(coveredLines)); analyzer.analyzeClass(is, null); } catch (Exception exception) { @@ -105,16 +103,11 @@ protected TestReport report( } } - List fileEntries = new ArrayList<>(segmentsBySourcePath.size()); - for (Map.Entry> e : - segmentsBySourcePath.entrySet()) { + List fileEntries = new ArrayList<>(coveredLinesBySourcePath.size()); + for (Map.Entry e : coveredLinesBySourcePath.entrySet()) { String sourcePath = e.getKey(); - - List segments = e.getValue(); - segments.sort(Comparator.naturalOrder()); - - List compressedSegments = getCompressedSegments(segments); - fileEntries.add(new TestReportFileEntry(sourcePath, compressedSegments)); + BitSet coveredLines = e.getValue(); + fileEntries.add(new TestReportFileEntry(sourcePath, coveredLines)); } for (String nonCodeResource : combinedNonCodeResources) { @@ -126,7 +119,7 @@ protected TestReport report( metrics.add(CiVisibilityCountMetric.CODE_COVERAGE_ERRORS, 1, CoverageErrorType.PATH); continue; } - fileEntries.add(new TestReportFileEntry(resourcePath, Collections.emptyList())); + fileEntries.add(new TestReportFileEntry(resourcePath, null)); } TestReport report = new TestReport(testSessionId, testSuiteId, testSpanId, fileEntries); @@ -141,29 +134,6 @@ protected TestReport report( } } - private static List getCompressedSegments( - List segments) { - List compressedSegments = new ArrayList<>(); - - int startLine = -1, endLine = -1; - for (TestReportFileEntry.Segment segment : segments) { - if (segment.getStartLine() <= endLine + 1) { - endLine = Math.max(endLine, segment.getEndLine()); - } else { - if (startLine > 0) { - compressedSegments.add(new TestReportFileEntry.Segment(startLine, -1, endLine, -1, -1)); - } - startLine = segment.getStartLine(); - endLine = segment.getEndLine(); - } - } - - if (startLine > 0) { - compressedSegments.add(new TestReportFileEntry.Segment(startLine, -1, endLine, -1, -1)); - } - return compressedSegments; - } - public static final class Factory implements CoverageStore.Factory { private final Map probeCounts = new ConcurrentHashMap<>(); diff --git a/dd-java-agent/agent-ci-visibility/src/main/java/datadog/trace/civisibility/coverage/line/SourceAnalyzer.java b/dd-java-agent/agent-ci-visibility/src/main/java/datadog/trace/civisibility/coverage/line/SourceAnalyzer.java index cd3c237d43e..c8c92e40c9a 100644 --- a/dd-java-agent/agent-ci-visibility/src/main/java/datadog/trace/civisibility/coverage/line/SourceAnalyzer.java +++ b/dd-java-agent/agent-ci-visibility/src/main/java/datadog/trace/civisibility/coverage/line/SourceAnalyzer.java @@ -1,17 +1,16 @@ package datadog.trace.civisibility.coverage.line; -import datadog.trace.api.civisibility.coverage.TestReportFileEntry; -import java.util.List; +import java.util.BitSet; import org.jacoco.core.analysis.IClassCoverage; import org.jacoco.core.analysis.ICounter; import org.jacoco.core.analysis.ICoverageVisitor; public class SourceAnalyzer implements ICoverageVisitor { - private final List segments; + private final BitSet coveredLines; - public SourceAnalyzer(List segments) { - this.segments = segments; + public SourceAnalyzer(BitSet coveredLines) { + this.coveredLines = coveredLines; } @Override @@ -26,17 +25,10 @@ public void visitCoverage(IClassCoverage coverage) { } int lastLine = coverage.getLastLine(); - int line = firstLine; - while (line <= lastLine) { + + for (int line = firstLine; line <= lastLine; line++) { if (coverage.getLine(line).getStatus() >= ICounter.FULLY_COVERED) { - int start = line++; - while (line <= lastLine && coverage.getLine(line).getStatus() >= ICounter.FULLY_COVERED) { - line++; - } - segments.add(new TestReportFileEntry.Segment(start, -1, line - 1, -1, -1)); - - } else { - line++; + coveredLines.set(line); } } } diff --git a/dd-java-agent/instrumentation/junit-4.10/cucumber-junit-4/src/test/resources/test-efd-known-test/coverages.ftl b/dd-java-agent/instrumentation/junit-4.10/cucumber-junit-4/src/test/resources/test-efd-known-test/coverages.ftl index 874bae33a26..1267ffdffd1 100644 --- a/dd-java-agent/instrumentation/junit-4.10/cucumber-junit-4/src/test/resources/test-efd-known-test/coverages.ftl +++ b/dd-java-agent/instrumentation/junit-4.10/cucumber-junit-4/src/test/resources/test-efd-known-test/coverages.ftl @@ -3,7 +3,6 @@ "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic.feature" } ] -} ] \ No newline at end of file +} ] diff --git a/dd-java-agent/instrumentation/junit-4.10/cucumber-junit-4/src/test/resources/test-efd-new-scenario-outline-5.4.0/coverages.ftl b/dd-java-agent/instrumentation/junit-4.10/cucumber-junit-4/src/test/resources/test-efd-new-scenario-outline-5.4.0/coverages.ftl index 630af736c72..a58037fc3df 100644 --- a/dd-java-agent/instrumentation/junit-4.10/cucumber-junit-4/src/test/resources/test-efd-new-scenario-outline-5.4.0/coverages.ftl +++ b/dd-java-agent/instrumentation/junit-4.10/cucumber-junit-4/src/test/resources/test-efd-new-scenario-outline-5.4.0/coverages.ftl @@ -3,63 +3,55 @@ "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature" } ] }, { "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id_2}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature" } ] }, { "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id_3}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature" } ] }, { "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id_4}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature" } ] }, { "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id_5}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature" } ] }, { "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id_6}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature" } ] }, { "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id_7}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature" } ] }, { "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id_8}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature" } ] -} ] \ No newline at end of file +} ] diff --git a/dd-java-agent/instrumentation/junit-4.10/cucumber-junit-4/src/test/resources/test-efd-new-scenario-outline-latest/coverages.ftl b/dd-java-agent/instrumentation/junit-4.10/cucumber-junit-4/src/test/resources/test-efd-new-scenario-outline-latest/coverages.ftl index 630af736c72..a58037fc3df 100644 --- a/dd-java-agent/instrumentation/junit-4.10/cucumber-junit-4/src/test/resources/test-efd-new-scenario-outline-latest/coverages.ftl +++ b/dd-java-agent/instrumentation/junit-4.10/cucumber-junit-4/src/test/resources/test-efd-new-scenario-outline-latest/coverages.ftl @@ -3,63 +3,55 @@ "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature" } ] }, { "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id_2}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature" } ] }, { "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id_3}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature" } ] }, { "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id_4}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature" } ] }, { "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id_5}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature" } ] }, { "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id_6}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature" } ] }, { "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id_7}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature" } ] }, { "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id_8}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature" } ] -} ] \ No newline at end of file +} ] diff --git a/dd-java-agent/instrumentation/junit-4.10/cucumber-junit-4/src/test/resources/test-efd-new-slow-test/coverages.ftl b/dd-java-agent/instrumentation/junit-4.10/cucumber-junit-4/src/test/resources/test-efd-new-slow-test/coverages.ftl index 87e9988266e..2ba77bb7bf7 100644 --- a/dd-java-agent/instrumentation/junit-4.10/cucumber-junit-4/src/test/resources/test-efd-new-slow-test/coverages.ftl +++ b/dd-java-agent/instrumentation/junit-4.10/cucumber-junit-4/src/test/resources/test-efd-new-slow-test/coverages.ftl @@ -3,15 +3,13 @@ "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_slow.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_slow.feature" } ] }, { "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id_2}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_slow.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_slow.feature" } ] -} ] \ No newline at end of file +} ] diff --git a/dd-java-agent/instrumentation/junit-4.10/cucumber-junit-4/src/test/resources/test-efd-new-test/coverages.ftl b/dd-java-agent/instrumentation/junit-4.10/cucumber-junit-4/src/test/resources/test-efd-new-test/coverages.ftl index df6d52dc3bd..0d51f5c95fc 100644 --- a/dd-java-agent/instrumentation/junit-4.10/cucumber-junit-4/src/test/resources/test-efd-new-test/coverages.ftl +++ b/dd-java-agent/instrumentation/junit-4.10/cucumber-junit-4/src/test/resources/test-efd-new-test/coverages.ftl @@ -3,23 +3,20 @@ "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic.feature" } ] }, { "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id_2}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic.feature" } ] }, { "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id_3}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic.feature" } ] -} ] \ No newline at end of file +} ] diff --git a/dd-java-agent/instrumentation/junit-4.10/cucumber-junit-4/src/test/resources/test-failure/coverages.ftl b/dd-java-agent/instrumentation/junit-4.10/cucumber-junit-4/src/test/resources/test-failure/coverages.ftl index 03cd4237460..c8bda9fe50b 100644 --- a/dd-java-agent/instrumentation/junit-4.10/cucumber-junit-4/src/test/resources/test-failure/coverages.ftl +++ b/dd-java-agent/instrumentation/junit-4.10/cucumber-junit-4/src/test/resources/test-failure/coverages.ftl @@ -3,7 +3,6 @@ "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_failed.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_failed.feature" } ] -} ] \ No newline at end of file +} ] diff --git a/dd-java-agent/instrumentation/junit-4.10/cucumber-junit-4/src/test/resources/test-multiple-features-5.4.0/coverages.ftl b/dd-java-agent/instrumentation/junit-4.10/cucumber-junit-4/src/test/resources/test-multiple-features-5.4.0/coverages.ftl index 1a153d82648..3e5b82015d3 100644 --- a/dd-java-agent/instrumentation/junit-4.10/cucumber-junit-4/src/test/resources/test-multiple-features-5.4.0/coverages.ftl +++ b/dd-java-agent/instrumentation/junit-4.10/cucumber-junit-4/src/test/resources/test-multiple-features-5.4.0/coverages.ftl @@ -3,15 +3,13 @@ "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic.feature" } ] }, { "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id_2}, "span_id" : ${content_span_id_2}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_failed.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_failed.feature" } ] -} ] \ No newline at end of file +} ] diff --git a/dd-java-agent/instrumentation/junit-4.10/cucumber-junit-4/src/test/resources/test-multiple-features-latest/coverages.ftl b/dd-java-agent/instrumentation/junit-4.10/cucumber-junit-4/src/test/resources/test-multiple-features-latest/coverages.ftl index 1a153d82648..3e5b82015d3 100644 --- a/dd-java-agent/instrumentation/junit-4.10/cucumber-junit-4/src/test/resources/test-multiple-features-latest/coverages.ftl +++ b/dd-java-agent/instrumentation/junit-4.10/cucumber-junit-4/src/test/resources/test-multiple-features-latest/coverages.ftl @@ -3,15 +3,13 @@ "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic.feature" } ] }, { "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id_2}, "span_id" : ${content_span_id_2}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_failed.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_failed.feature" } ] -} ] \ No newline at end of file +} ] diff --git a/dd-java-agent/instrumentation/junit-4.10/cucumber-junit-4/src/test/resources/test-retry-failure/coverages.ftl b/dd-java-agent/instrumentation/junit-4.10/cucumber-junit-4/src/test/resources/test-retry-failure/coverages.ftl index 91a96ac1cc3..96294358925 100644 --- a/dd-java-agent/instrumentation/junit-4.10/cucumber-junit-4/src/test/resources/test-retry-failure/coverages.ftl +++ b/dd-java-agent/instrumentation/junit-4.10/cucumber-junit-4/src/test/resources/test-retry-failure/coverages.ftl @@ -3,39 +3,34 @@ "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_failed.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_failed.feature" } ] }, { "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id_2}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_failed.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_failed.feature" } ] }, { "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id_3}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_failed.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_failed.feature" } ] }, { "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id_4}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_failed.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_failed.feature" } ] }, { "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id_5}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_failed.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_failed.feature" } ] -} ] \ No newline at end of file +} ] diff --git a/dd-java-agent/instrumentation/junit-4.10/cucumber-junit-4/src/test/resources/test-retry-scenario-outline-5.4.0/coverages.ftl b/dd-java-agent/instrumentation/junit-4.10/cucumber-junit-4/src/test/resources/test-retry-scenario-outline-5.4.0/coverages.ftl index 1f61a47ac80..43883a48a6b 100644 --- a/dd-java-agent/instrumentation/junit-4.10/cucumber-junit-4/src/test/resources/test-retry-scenario-outline-5.4.0/coverages.ftl +++ b/dd-java-agent/instrumentation/junit-4.10/cucumber-junit-4/src/test/resources/test-retry-scenario-outline-5.4.0/coverages.ftl @@ -3,63 +3,55 @@ "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples_failed.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples_failed.feature" } ] }, { "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id_2}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples_failed.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples_failed.feature" } ] }, { "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id_3}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples_failed.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples_failed.feature" } ] }, { "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id_4}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples_failed.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples_failed.feature" } ] }, { "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id_5}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples_failed.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples_failed.feature" } ] }, { "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id_6}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples_failed.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples_failed.feature" } ] }, { "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id_7}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples_failed.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples_failed.feature" } ] }, { "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id_8}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples_failed.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples_failed.feature" } ] -} ] \ No newline at end of file +} ] diff --git a/dd-java-agent/instrumentation/junit-4.10/cucumber-junit-4/src/test/resources/test-retry-scenario-outline-latest/coverages.ftl b/dd-java-agent/instrumentation/junit-4.10/cucumber-junit-4/src/test/resources/test-retry-scenario-outline-latest/coverages.ftl index 88f6b438d21..54d3e0ba293 100644 --- a/dd-java-agent/instrumentation/junit-4.10/cucumber-junit-4/src/test/resources/test-retry-scenario-outline-latest/coverages.ftl +++ b/dd-java-agent/instrumentation/junit-4.10/cucumber-junit-4/src/test/resources/test-retry-scenario-outline-latest/coverages.ftl @@ -3,31 +3,27 @@ "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples_failed.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples_failed.feature" } ] }, { "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id_2}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples_failed.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples_failed.feature" } ] }, { "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id_3}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples_failed.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples_failed.feature" } ] }, { "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id_4}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples_failed.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples_failed.feature" } ] -} ] \ No newline at end of file +} ] diff --git a/dd-java-agent/instrumentation/junit-4.10/cucumber-junit-4/src/test/resources/test-scenario-outline-5.4.0/coverages.ftl b/dd-java-agent/instrumentation/junit-4.10/cucumber-junit-4/src/test/resources/test-scenario-outline-5.4.0/coverages.ftl index 2f8436e79a3..9417e56f18c 100644 --- a/dd-java-agent/instrumentation/junit-4.10/cucumber-junit-4/src/test/resources/test-scenario-outline-5.4.0/coverages.ftl +++ b/dd-java-agent/instrumentation/junit-4.10/cucumber-junit-4/src/test/resources/test-scenario-outline-5.4.0/coverages.ftl @@ -3,31 +3,27 @@ "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature" } ] }, { "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id_2}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature" } ] }, { "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id_3}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature" } ] }, { "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id_4}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature" } ] -} ] \ No newline at end of file +} ] diff --git a/dd-java-agent/instrumentation/junit-4.10/cucumber-junit-4/src/test/resources/test-scenario-outline-latest/coverages.ftl b/dd-java-agent/instrumentation/junit-4.10/cucumber-junit-4/src/test/resources/test-scenario-outline-latest/coverages.ftl index 2f8436e79a3..9417e56f18c 100644 --- a/dd-java-agent/instrumentation/junit-4.10/cucumber-junit-4/src/test/resources/test-scenario-outline-latest/coverages.ftl +++ b/dd-java-agent/instrumentation/junit-4.10/cucumber-junit-4/src/test/resources/test-scenario-outline-latest/coverages.ftl @@ -3,31 +3,27 @@ "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature" } ] }, { "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id_2}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature" } ] }, { "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id_3}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature" } ] }, { "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id_4}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature" } ] -} ] \ No newline at end of file +} ] diff --git a/dd-java-agent/instrumentation/junit-4.10/cucumber-junit-4/src/test/resources/test-succeed/coverages.ftl b/dd-java-agent/instrumentation/junit-4.10/cucumber-junit-4/src/test/resources/test-succeed/coverages.ftl index 874bae33a26..1267ffdffd1 100644 --- a/dd-java-agent/instrumentation/junit-4.10/cucumber-junit-4/src/test/resources/test-succeed/coverages.ftl +++ b/dd-java-agent/instrumentation/junit-4.10/cucumber-junit-4/src/test/resources/test-succeed/coverages.ftl @@ -3,7 +3,6 @@ "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic.feature" } ] -} ] \ No newline at end of file +} ] diff --git a/dd-java-agent/instrumentation/junit-5.3/cucumber-junit-5/src/test/resources/test-efd-known-test/coverages.ftl b/dd-java-agent/instrumentation/junit-5.3/cucumber-junit-5/src/test/resources/test-efd-known-test/coverages.ftl index 874bae33a26..1267ffdffd1 100644 --- a/dd-java-agent/instrumentation/junit-5.3/cucumber-junit-5/src/test/resources/test-efd-known-test/coverages.ftl +++ b/dd-java-agent/instrumentation/junit-5.3/cucumber-junit-5/src/test/resources/test-efd-known-test/coverages.ftl @@ -3,7 +3,6 @@ "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic.feature" } ] -} ] \ No newline at end of file +} ] diff --git a/dd-java-agent/instrumentation/junit-5.3/cucumber-junit-5/src/test/resources/test-efd-new-scenario-outline-5.4.0/coverages.ftl b/dd-java-agent/instrumentation/junit-5.3/cucumber-junit-5/src/test/resources/test-efd-new-scenario-outline-5.4.0/coverages.ftl index fc36d2b0abe..ddc58e7b07e 100644 --- a/dd-java-agent/instrumentation/junit-5.3/cucumber-junit-5/src/test/resources/test-efd-new-scenario-outline-5.4.0/coverages.ftl +++ b/dd-java-agent/instrumentation/junit-5.3/cucumber-junit-5/src/test/resources/test-efd-new-scenario-outline-5.4.0/coverages.ftl @@ -3,63 +3,55 @@ "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id_3}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature" } ] }, { "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id_4}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature" } ] }, { "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id_5}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature" } ] }, { "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id_6}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature" } ] }, { "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id_7}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature" } ] }, { "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id_8}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature" } ] }, { "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature" } ] }, { "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id_2}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature" } ] -} ] \ No newline at end of file +} ] diff --git a/dd-java-agent/instrumentation/junit-5.3/cucumber-junit-5/src/test/resources/test-efd-new-scenario-outline-latest/coverages.ftl b/dd-java-agent/instrumentation/junit-5.3/cucumber-junit-5/src/test/resources/test-efd-new-scenario-outline-latest/coverages.ftl index fc36d2b0abe..ddc58e7b07e 100644 --- a/dd-java-agent/instrumentation/junit-5.3/cucumber-junit-5/src/test/resources/test-efd-new-scenario-outline-latest/coverages.ftl +++ b/dd-java-agent/instrumentation/junit-5.3/cucumber-junit-5/src/test/resources/test-efd-new-scenario-outline-latest/coverages.ftl @@ -3,63 +3,55 @@ "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id_3}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature" } ] }, { "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id_4}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature" } ] }, { "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id_5}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature" } ] }, { "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id_6}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature" } ] }, { "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id_7}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature" } ] }, { "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id_8}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature" } ] }, { "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature" } ] }, { "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id_2}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature" } ] -} ] \ No newline at end of file +} ] diff --git a/dd-java-agent/instrumentation/junit-5.3/cucumber-junit-5/src/test/resources/test-efd-new-slow-test/coverages.ftl b/dd-java-agent/instrumentation/junit-5.3/cucumber-junit-5/src/test/resources/test-efd-new-slow-test/coverages.ftl index 87e9988266e..2ba77bb7bf7 100644 --- a/dd-java-agent/instrumentation/junit-5.3/cucumber-junit-5/src/test/resources/test-efd-new-slow-test/coverages.ftl +++ b/dd-java-agent/instrumentation/junit-5.3/cucumber-junit-5/src/test/resources/test-efd-new-slow-test/coverages.ftl @@ -3,15 +3,13 @@ "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_slow.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_slow.feature" } ] }, { "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id_2}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_slow.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_slow.feature" } ] -} ] \ No newline at end of file +} ] diff --git a/dd-java-agent/instrumentation/junit-5.3/cucumber-junit-5/src/test/resources/test-efd-new-test/coverages.ftl b/dd-java-agent/instrumentation/junit-5.3/cucumber-junit-5/src/test/resources/test-efd-new-test/coverages.ftl index df6d52dc3bd..0d51f5c95fc 100644 --- a/dd-java-agent/instrumentation/junit-5.3/cucumber-junit-5/src/test/resources/test-efd-new-test/coverages.ftl +++ b/dd-java-agent/instrumentation/junit-5.3/cucumber-junit-5/src/test/resources/test-efd-new-test/coverages.ftl @@ -3,23 +3,20 @@ "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic.feature" } ] }, { "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id_2}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic.feature" } ] }, { "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id_3}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic.feature" } ] -} ] \ No newline at end of file +} ] diff --git a/dd-java-agent/instrumentation/junit-5.3/cucumber-junit-5/src/test/resources/test-failed-scenario-outline-5.4.0/coverages.ftl b/dd-java-agent/instrumentation/junit-5.3/cucumber-junit-5/src/test/resources/test-failed-scenario-outline-5.4.0/coverages.ftl index 23922f06f5d..f1add816e1d 100644 --- a/dd-java-agent/instrumentation/junit-5.3/cucumber-junit-5/src/test/resources/test-failed-scenario-outline-5.4.0/coverages.ftl +++ b/dd-java-agent/instrumentation/junit-5.3/cucumber-junit-5/src/test/resources/test-failed-scenario-outline-5.4.0/coverages.ftl @@ -3,47 +3,41 @@ "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_failed_examples.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_failed_examples.feature" } ] }, { "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id_2}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_failed_examples.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_failed_examples.feature" } ] }, { "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id_3}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_failed_examples.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_failed_examples.feature" } ] }, { "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id_4}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_failed_examples.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_failed_examples.feature" } ] }, { "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id_5}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_failed_examples.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_failed_examples.feature" } ] }, { "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id_6}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_failed_examples.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_failed_examples.feature" } ] -} ] \ No newline at end of file +} ] diff --git a/dd-java-agent/instrumentation/junit-5.3/cucumber-junit-5/src/test/resources/test-failed-scenario-outline-latest/coverages.ftl b/dd-java-agent/instrumentation/junit-5.3/cucumber-junit-5/src/test/resources/test-failed-scenario-outline-latest/coverages.ftl index 23922f06f5d..f1add816e1d 100644 --- a/dd-java-agent/instrumentation/junit-5.3/cucumber-junit-5/src/test/resources/test-failed-scenario-outline-latest/coverages.ftl +++ b/dd-java-agent/instrumentation/junit-5.3/cucumber-junit-5/src/test/resources/test-failed-scenario-outline-latest/coverages.ftl @@ -3,47 +3,41 @@ "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_failed_examples.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_failed_examples.feature" } ] }, { "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id_2}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_failed_examples.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_failed_examples.feature" } ] }, { "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id_3}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_failed_examples.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_failed_examples.feature" } ] }, { "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id_4}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_failed_examples.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_failed_examples.feature" } ] }, { "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id_5}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_failed_examples.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_failed_examples.feature" } ] }, { "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id_6}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_failed_examples.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_failed_examples.feature" } ] -} ] \ No newline at end of file +} ] diff --git a/dd-java-agent/instrumentation/junit-5.3/cucumber-junit-5/src/test/resources/test-failed-then-succeed/coverages.ftl b/dd-java-agent/instrumentation/junit-5.3/cucumber-junit-5/src/test/resources/test-failed-then-succeed/coverages.ftl index 29fcd8be749..b3d4e1706c3 100644 --- a/dd-java-agent/instrumentation/junit-5.3/cucumber-junit-5/src/test/resources/test-failed-then-succeed/coverages.ftl +++ b/dd-java-agent/instrumentation/junit-5.3/cucumber-junit-5/src/test/resources/test-failed-then-succeed/coverages.ftl @@ -3,23 +3,20 @@ "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_failed_then_succeed.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_failed_then_succeed.feature" } ] }, { "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id_2}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_failed_then_succeed.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_failed_then_succeed.feature" } ] }, { "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id_3}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_failed_then_succeed.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_failed_then_succeed.feature" } ] -} ] \ No newline at end of file +} ] diff --git a/dd-java-agent/instrumentation/junit-5.3/cucumber-junit-5/src/test/resources/test-failed/coverages.ftl b/dd-java-agent/instrumentation/junit-5.3/cucumber-junit-5/src/test/resources/test-failed/coverages.ftl index 03cd4237460..c8bda9fe50b 100644 --- a/dd-java-agent/instrumentation/junit-5.3/cucumber-junit-5/src/test/resources/test-failed/coverages.ftl +++ b/dd-java-agent/instrumentation/junit-5.3/cucumber-junit-5/src/test/resources/test-failed/coverages.ftl @@ -3,7 +3,6 @@ "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_failed.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_failed.feature" } ] -} ] \ No newline at end of file +} ] diff --git a/dd-java-agent/instrumentation/junit-5.3/cucumber-junit-5/src/test/resources/test-parallel/coverages.ftl b/dd-java-agent/instrumentation/junit-5.3/cucumber-junit-5/src/test/resources/test-parallel/coverages.ftl index b182c4a47a1..159b4459d71 100644 --- a/dd-java-agent/instrumentation/junit-5.3/cucumber-junit-5/src/test/resources/test-parallel/coverages.ftl +++ b/dd-java-agent/instrumentation/junit-5.3/cucumber-junit-5/src/test/resources/test-parallel/coverages.ftl @@ -3,15 +3,13 @@ "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic.feature" } ] }, { "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id_2}, "span_id" : ${content_span_id_3}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_skipped.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_skipped.feature" } ] -} ] \ No newline at end of file +} ] diff --git a/dd-java-agent/instrumentation/junit-5.3/cucumber-junit-5/src/test/resources/test-retry-failed/coverages.ftl b/dd-java-agent/instrumentation/junit-5.3/cucumber-junit-5/src/test/resources/test-retry-failed/coverages.ftl index 91a96ac1cc3..96294358925 100644 --- a/dd-java-agent/instrumentation/junit-5.3/cucumber-junit-5/src/test/resources/test-retry-failed/coverages.ftl +++ b/dd-java-agent/instrumentation/junit-5.3/cucumber-junit-5/src/test/resources/test-retry-failed/coverages.ftl @@ -3,39 +3,34 @@ "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_failed.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_failed.feature" } ] }, { "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id_2}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_failed.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_failed.feature" } ] }, { "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id_3}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_failed.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_failed.feature" } ] }, { "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id_4}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_failed.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_failed.feature" } ] }, { "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id_5}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_failed.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_failed.feature" } ] -} ] \ No newline at end of file +} ] diff --git a/dd-java-agent/instrumentation/junit-5.3/cucumber-junit-5/src/test/resources/test-scenario-outline-5.4.0/coverages.ftl b/dd-java-agent/instrumentation/junit-5.3/cucumber-junit-5/src/test/resources/test-scenario-outline-5.4.0/coverages.ftl index aba08d64725..f5da6c611b0 100644 --- a/dd-java-agent/instrumentation/junit-5.3/cucumber-junit-5/src/test/resources/test-scenario-outline-5.4.0/coverages.ftl +++ b/dd-java-agent/instrumentation/junit-5.3/cucumber-junit-5/src/test/resources/test-scenario-outline-5.4.0/coverages.ftl @@ -3,31 +3,27 @@ "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id_3}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature" } ] }, { "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id_4}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature" } ] }, { "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature" } ] }, { "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id_2}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature" } ] -} ] \ No newline at end of file +} ] diff --git a/dd-java-agent/instrumentation/junit-5.3/cucumber-junit-5/src/test/resources/test-scenario-outline-latest/coverages.ftl b/dd-java-agent/instrumentation/junit-5.3/cucumber-junit-5/src/test/resources/test-scenario-outline-latest/coverages.ftl index 6f3af7f03c5..956897f7795 100644 --- a/dd-java-agent/instrumentation/junit-5.3/cucumber-junit-5/src/test/resources/test-scenario-outline-latest/coverages.ftl +++ b/dd-java-agent/instrumentation/junit-5.3/cucumber-junit-5/src/test/resources/test-scenario-outline-latest/coverages.ftl @@ -1,33 +1,29 @@ [ { "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature" } ], "span_id" : ${content_span_id_3}, "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id} }, { "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature" } ], "span_id" : ${content_span_id_4}, "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id} }, { "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature" } ], "span_id" : ${content_span_id}, "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id} }, { "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_with_examples.feature" } ], "span_id" : ${content_span_id_2}, "test_session_id" : ${content_test_session_id}, "test_suite_id" : ${content_test_suite_id} -} ] \ No newline at end of file +} ] diff --git a/dd-java-agent/instrumentation/junit-5.3/cucumber-junit-5/src/test/resources/test-skipped/coverages.ftl b/dd-java-agent/instrumentation/junit-5.3/cucumber-junit-5/src/test/resources/test-skipped/coverages.ftl index fe5f10cd27d..cb2f993f810 100644 --- a/dd-java-agent/instrumentation/junit-5.3/cucumber-junit-5/src/test/resources/test-skipped/coverages.ftl +++ b/dd-java-agent/instrumentation/junit-5.3/cucumber-junit-5/src/test/resources/test-skipped/coverages.ftl @@ -3,7 +3,6 @@ "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id_2}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic_skipped.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic_skipped.feature" } ] -} ] \ No newline at end of file +} ] diff --git a/dd-java-agent/instrumentation/junit-5.3/cucumber-junit-5/src/test/resources/test-succeed/coverages.ftl b/dd-java-agent/instrumentation/junit-5.3/cucumber-junit-5/src/test/resources/test-succeed/coverages.ftl index 874bae33a26..1267ffdffd1 100644 --- a/dd-java-agent/instrumentation/junit-5.3/cucumber-junit-5/src/test/resources/test-succeed/coverages.ftl +++ b/dd-java-agent/instrumentation/junit-5.3/cucumber-junit-5/src/test/resources/test-succeed/coverages.ftl @@ -3,7 +3,6 @@ "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id}, "files" : [ { - "filename" : "org/example/cucumber/calculator/basic_arithmetic.feature", - "segments" : [ ] + "filename" : "org/example/cucumber/calculator/basic_arithmetic.feature" } ] -} ] \ No newline at end of file +} ] diff --git a/dd-smoke-tests/gradle/src/test/resources/test-succeed-junit-5/coverages.ftl b/dd-smoke-tests/gradle/src/test/resources/test-succeed-junit-5/coverages.ftl index 8fc0ad78841..b6b94b8bcd4 100644 --- a/dd-smoke-tests/gradle/src/test/resources/test-succeed-junit-5/coverages.ftl +++ b/dd-smoke-tests/gradle/src/test/resources/test-succeed-junit-5/coverages.ftl @@ -4,9 +4,9 @@ "span_id" : ${content_span_id}, "files" : [ { "filename" : "src/test/java/datadog/smoke/TestSucceed.java", - "segments" : [ [ 11, -1, 12, -1, -1 ] ] + "bitmap" : "ABg=" }, { "filename" : "src/main/java/datadog/smoke/Calculator.java", - "segments" : [ [ 5, -1, 5, -1, -1 ] ] + "bitmap" : "IA==" } ] } ] \ No newline at end of file diff --git a/dd-smoke-tests/gradle/src/test/resources/test-succeed-multi-forks-new-instrumentation/coverages.ftl b/dd-smoke-tests/gradle/src/test/resources/test-succeed-multi-forks-new-instrumentation/coverages.ftl index e18b060709d..a9c1fdf69f2 100644 --- a/dd-smoke-tests/gradle/src/test/resources/test-succeed-multi-forks-new-instrumentation/coverages.ftl +++ b/dd-smoke-tests/gradle/src/test/resources/test-succeed-multi-forks-new-instrumentation/coverages.ftl @@ -4,10 +4,10 @@ "span_id" : ${content_span_id}, "files" : [ { "filename" : "src/test/java/datadog/smoke/TestSucceed.java", - "segments" : [ [ 7, -1, 7, -1, -1 ], [ 10, -1, 11, -1, -1 ] ] + "bitmap" : "gAw=" }, { "filename" : "src/main/java/datadog/smoke/Calculator.java", - "segments" : [ [ 5, -1, 5, -1, -1 ] ] + "bitmap" : "IA==" } ] }, { "test_session_id" : ${content_test_session_id}, @@ -15,9 +15,9 @@ "span_id" : ${content_span_id_2}, "files" : [ { "filename" : "src/main/java/datadog/smoke/Calculator.java", - "segments" : [ [ 8, -1, 8, -1, -1 ] ] + "bitmap" : "AAE=" }, { "filename" : "src/test/java/datadog/smoke/TestSucceedJunit5.java", - "segments" : [ [ 10, -1, 11, -1, -1 ] ] + "bitmap" : "AAw=" } ] -} ] \ No newline at end of file +} ] diff --git a/dd-smoke-tests/gradle/src/test/resources/test-succeed-multi-module-new-instrumentation/coverages.ftl b/dd-smoke-tests/gradle/src/test/resources/test-succeed-multi-module-new-instrumentation/coverages.ftl index e947ded6455..b11826522dd 100644 --- a/dd-smoke-tests/gradle/src/test/resources/test-succeed-multi-module-new-instrumentation/coverages.ftl +++ b/dd-smoke-tests/gradle/src/test/resources/test-succeed-multi-module-new-instrumentation/coverages.ftl @@ -4,7 +4,7 @@ "span_id" : ${content_span_id}, "files" : [ { "filename" : "submodule-a/src/test/java/datadog/smoke/TestSucceed.java", - "segments" : [ [ 11, -1, 12, -1, -1 ] ] + "bitmap" : "ABg=" } ] }, { "test_session_id" : ${content_test_session_id}, @@ -12,6 +12,6 @@ "span_id" : ${content_span_id_2}, "files" : [ { "filename" : "submodule-b/src/test/java/datadog/smoke/TestSucceed.java", - "segments" : [ [ 11, -1, 12, -1, -1 ] ] + "bitmap" : "ABg=" } ] } ] \ No newline at end of file diff --git a/dd-smoke-tests/gradle/src/test/resources/test-succeed-new-instrumentation/coverages.ftl b/dd-smoke-tests/gradle/src/test/resources/test-succeed-new-instrumentation/coverages.ftl index 8fc0ad78841..b6b94b8bcd4 100644 --- a/dd-smoke-tests/gradle/src/test/resources/test-succeed-new-instrumentation/coverages.ftl +++ b/dd-smoke-tests/gradle/src/test/resources/test-succeed-new-instrumentation/coverages.ftl @@ -4,9 +4,9 @@ "span_id" : ${content_span_id}, "files" : [ { "filename" : "src/test/java/datadog/smoke/TestSucceed.java", - "segments" : [ [ 11, -1, 12, -1, -1 ] ] + "bitmap" : "ABg=" }, { "filename" : "src/main/java/datadog/smoke/Calculator.java", - "segments" : [ [ 5, -1, 5, -1, -1 ] ] + "bitmap" : "IA==" } ] } ] \ No newline at end of file diff --git a/dd-smoke-tests/maven/src/test/resources/test_failed_maven_run_flaky_retries/coverages.ftl b/dd-smoke-tests/maven/src/test/resources/test_failed_maven_run_flaky_retries/coverages.ftl index 0c9ae04176b..2564a09f96e 100644 --- a/dd-smoke-tests/maven/src/test/resources/test_failed_maven_run_flaky_retries/coverages.ftl +++ b/dd-smoke-tests/maven/src/test/resources/test_failed_maven_run_flaky_retries/coverages.ftl @@ -4,10 +4,10 @@ "span_id" : ${content_span_id}, "files" : [ { "filename" : "src/main/java/datadog/smoke/Calculator.java", - "segments" : [ [ 5, -1, 5, -1, -1 ] ] + "bitmap" : "IA==" }, { "filename" : "src/test/java/datadog/smoke/TestFailed.java", - "segments" : [ [ 7, -1, 7, -1, -1 ], [ 11, -1, 11, -1, -1 ] ] + "bitmap" : "gAg=" } ] }, { "test_session_id" : ${content_test_session_id}, @@ -15,10 +15,10 @@ "span_id" : ${content_span_id_2}, "files" : [ { "filename" : "src/main/java/datadog/smoke/Calculator.java", - "segments" : [ [ 5, -1, 5, -1, -1 ] ] + "bitmap" : "IA==" }, { "filename" : "src/test/java/datadog/smoke/TestFailed.java", - "segments" : [ [ 7, -1, 7, -1, -1 ], [ 11, -1, 11, -1, -1 ] ] + "bitmap" : "gAg=" } ] }, { "test_session_id" : ${content_test_session_id}, @@ -26,10 +26,10 @@ "span_id" : ${content_span_id_3}, "files" : [ { "filename" : "src/main/java/datadog/smoke/Calculator.java", - "segments" : [ [ 5, -1, 5, -1, -1 ] ] + "bitmap" : "IA==" }, { "filename" : "src/test/java/datadog/smoke/TestFailed.java", - "segments" : [ [ 7, -1, 7, -1, -1 ], [ 11, -1, 11, -1, -1 ] ] + "bitmap" : "gAg=" } ] }, { "test_session_id" : ${content_test_session_id}, @@ -37,10 +37,10 @@ "span_id" : ${content_span_id_4}, "files" : [ { "filename" : "src/main/java/datadog/smoke/Calculator.java", - "segments" : [ [ 5, -1, 5, -1, -1 ] ] + "bitmap" : "IA==" }, { "filename" : "src/test/java/datadog/smoke/TestFailed.java", - "segments" : [ [ 7, -1, 7, -1, -1 ], [ 11, -1, 11, -1, -1 ] ] + "bitmap" : "gAg=" } ] }, { "test_session_id" : ${content_test_session_id}, @@ -48,9 +48,9 @@ "span_id" : ${content_span_id_5}, "files" : [ { "filename" : "src/main/java/datadog/smoke/Calculator.java", - "segments" : [ [ 5, -1, 5, -1, -1 ] ] + "bitmap" : "IA==" }, { "filename" : "src/test/java/datadog/smoke/TestFailed.java", - "segments" : [ [ 7, -1, 7, -1, -1 ], [ 11, -1, 11, -1, -1 ] ] + "bitmap" : "gAg=" } ] } ] \ No newline at end of file diff --git a/dd-smoke-tests/maven/src/test/resources/test_successful_maven_run/coverages.ftl b/dd-smoke-tests/maven/src/test/resources/test_successful_maven_run/coverages.ftl index 71c1c9ffd26..e396263abc0 100644 --- a/dd-smoke-tests/maven/src/test/resources/test_successful_maven_run/coverages.ftl +++ b/dd-smoke-tests/maven/src/test/resources/test_successful_maven_run/coverages.ftl @@ -4,9 +4,9 @@ "span_id" : ${content_span_id}, "files" : [ { "filename" : "src/test/java/datadog/smoke/TestSucceed.java", - "segments" : [ [ 7, -1, 7, -1, -1 ], [ 11, -1, 12, -1, -1 ] ] + "bitmap" : "gBg=" }, { "filename" : "src/main/java/datadog/smoke/Calculator.java", - "segments" : [ [ 5, -1, 5, -1, -1 ] ] + "bitmap" : "IA==" } ] } ] \ No newline at end of file diff --git a/dd-smoke-tests/maven/src/test/resources/test_successful_maven_run_builtin_coverage/coverages.ftl b/dd-smoke-tests/maven/src/test/resources/test_successful_maven_run_builtin_coverage/coverages.ftl index 7b522bb7731..6d41f7aa75f 100644 --- a/dd-smoke-tests/maven/src/test/resources/test_successful_maven_run_builtin_coverage/coverages.ftl +++ b/dd-smoke-tests/maven/src/test/resources/test_successful_maven_run_builtin_coverage/coverages.ftl @@ -3,10 +3,8 @@ "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id}, "files" : [ { - "filename" : "src/test/java/datadog/smoke/TestSucceed.java", - "segments" : [ ] + "filename" : "src/test/java/datadog/smoke/TestSucceed.java" }, { - "filename" : "src/main/java/datadog/smoke/Calculator.java", - "segments" : [ ] + "filename" : "src/main/java/datadog/smoke/Calculator.java" } ] } ] \ No newline at end of file diff --git a/dd-smoke-tests/maven/src/test/resources/test_successful_maven_run_surefire_3_0_0/coverages.ftl b/dd-smoke-tests/maven/src/test/resources/test_successful_maven_run_surefire_3_0_0/coverages.ftl index 71c1c9ffd26..e396263abc0 100644 --- a/dd-smoke-tests/maven/src/test/resources/test_successful_maven_run_surefire_3_0_0/coverages.ftl +++ b/dd-smoke-tests/maven/src/test/resources/test_successful_maven_run_surefire_3_0_0/coverages.ftl @@ -4,9 +4,9 @@ "span_id" : ${content_span_id}, "files" : [ { "filename" : "src/test/java/datadog/smoke/TestSucceed.java", - "segments" : [ [ 7, -1, 7, -1, -1 ], [ 11, -1, 12, -1, -1 ] ] + "bitmap" : "gBg=" }, { "filename" : "src/main/java/datadog/smoke/Calculator.java", - "segments" : [ [ 5, -1, 5, -1, -1 ] ] + "bitmap" : "IA==" } ] } ] \ No newline at end of file diff --git a/dd-smoke-tests/maven/src/test/resources/test_successful_maven_run_with_arg_line_property/coverages.ftl b/dd-smoke-tests/maven/src/test/resources/test_successful_maven_run_with_arg_line_property/coverages.ftl index f3bb5186115..7313480cedb 100644 --- a/dd-smoke-tests/maven/src/test/resources/test_successful_maven_run_with_arg_line_property/coverages.ftl +++ b/dd-smoke-tests/maven/src/test/resources/test_successful_maven_run_with_arg_line_property/coverages.ftl @@ -3,7 +3,6 @@ "test_suite_id" : ${content_test_suite_id}, "span_id" : ${content_span_id}, "files" : [ { - "filename" : "src/test/java/datadog/smoke/TestSucceedPropertyAssertion.java", - "segments" : [ ] + "filename" : "src/test/java/datadog/smoke/TestSucceedPropertyAssertion.java" } ] } ] \ No newline at end of file diff --git a/dd-smoke-tests/maven/src/test/resources/test_successful_maven_run_with_cucumber/coverages.ftl b/dd-smoke-tests/maven/src/test/resources/test_successful_maven_run_with_cucumber/coverages.ftl index de31bcc96d7..ba58ec9f8d1 100644 --- a/dd-smoke-tests/maven/src/test/resources/test_successful_maven_run_with_cucumber/coverages.ftl +++ b/dd-smoke-tests/maven/src/test/resources/test_successful_maven_run_with_cucumber/coverages.ftl @@ -4,9 +4,8 @@ "span_id" : ${content_parent_id}, "files" : [ { "filename" : "src/test/java/datadog/smoke/calculator/CalculatorSteps.java", - "segments" : [ [ 13, -1, 13, -1, -1 ], [ 19, -1, 20, -1, -1 ], [ 24, -1, 27, -1, -1 ], [ 30, -1, 34, -1, -1 ], [ 36, -1, 40, -1, -1 ], [ 42, -1, 43, -1, -1 ], [ 49, -1, 51, -1, -1 ], [ 53, -1, 53, -1, -1 ], [ 56, -1, 56, -1, -1 ] ] + "bitmap" : "ACAYz/cNLgE=" }, { - "filename" : "src/test/resources/datadog/smoke/basic_arithmetic.feature", - "segments" : [ ] + "filename" : "src/test/resources/datadog/smoke/basic_arithmetic.feature" } ] } ] \ No newline at end of file diff --git a/dd-smoke-tests/maven/src/test/resources/test_successful_maven_run_with_jacoco_and_argline/coverages.ftl b/dd-smoke-tests/maven/src/test/resources/test_successful_maven_run_with_jacoco_and_argline/coverages.ftl index 71c1c9ffd26..e396263abc0 100644 --- a/dd-smoke-tests/maven/src/test/resources/test_successful_maven_run_with_jacoco_and_argline/coverages.ftl +++ b/dd-smoke-tests/maven/src/test/resources/test_successful_maven_run_with_jacoco_and_argline/coverages.ftl @@ -4,9 +4,9 @@ "span_id" : ${content_span_id}, "files" : [ { "filename" : "src/test/java/datadog/smoke/TestSucceed.java", - "segments" : [ [ 7, -1, 7, -1, -1 ], [ 11, -1, 12, -1, -1 ] ] + "bitmap" : "gBg=" }, { "filename" : "src/main/java/datadog/smoke/Calculator.java", - "segments" : [ [ 5, -1, 5, -1, -1 ] ] + "bitmap" : "IA==" } ] } ] \ No newline at end of file diff --git a/dd-trace-core/src/main/java/datadog/trace/civisibility/writer/ddintake/CiTestCovMapperV2.java b/dd-trace-core/src/main/java/datadog/trace/civisibility/writer/ddintake/CiTestCovMapperV2.java index 5d535b904a1..fe8f23f2632 100644 --- a/dd-trace-core/src/main/java/datadog/trace/civisibility/writer/ddintake/CiTestCovMapperV2.java +++ b/dd-trace-core/src/main/java/datadog/trace/civisibility/writer/ddintake/CiTestCovMapperV2.java @@ -27,6 +27,7 @@ import java.nio.channels.WritableByteChannel; import java.nio.charset.StandardCharsets; import java.util.Arrays; +import java.util.BitSet; import java.util.Collection; import java.util.Collections; import java.util.List; @@ -42,7 +43,7 @@ public class CiTestCovMapperV2 implements RemoteMapper { private static final byte[] SPAN_ID = "span_id".getBytes(StandardCharsets.UTF_8); private static final byte[] FILES = "files".getBytes(StandardCharsets.UTF_8); private static final byte[] FILENAME = "filename".getBytes(StandardCharsets.UTF_8); - private static final byte[] SEGMENTS = "segments".getBytes(StandardCharsets.UTF_8); + private static final byte[] BITMAP = "bitmap".getBytes(StandardCharsets.UTF_8); private final int size; private final GrowableBuffer headerBuffer; @@ -102,23 +103,17 @@ public void map(List> trace, Writable writable) { writable.startArray(fileEntries.size()); for (TestReportFileEntry entry : fileEntries) { - writable.startMap(2); + BitSet coveredLines = entry.getCoveredLines(); + boolean lineInfoPresent = coveredLines != null; + + writable.startMap(1 + (lineInfoPresent ? 1 : 0)); writable.writeUTF8(FILENAME); writable.writeString(entry.getSourceFileName(), null); - Collection segments = entry.getSegments(); - - writable.writeUTF8(SEGMENTS); - writable.startArray(segments.size()); - - for (TestReportFileEntry.Segment segment : segments) { - writable.startArray(5); - writable.writeInt(segment.getStartLine()); - writable.writeInt(segment.getStartColumn()); - writable.writeInt(segment.getEndLine()); - writable.writeInt(segment.getEndColumn()); - writable.writeInt(segment.getNumberOfExecutions()); + if (lineInfoPresent) { + writable.writeUTF8(BITMAP); + writable.writeBinary(coveredLines.toByteArray()); } } diff --git a/dd-trace-core/src/test/groovy/datadog/trace/civisibility/writer/ddintake/CiTestCovMapperV2Test.groovy b/dd-trace-core/src/test/groovy/datadog/trace/civisibility/writer/ddintake/CiTestCovMapperV2Test.groovy index eebe378e46a..4655befb48e 100644 --- a/dd-trace-core/src/test/groovy/datadog/trace/civisibility/writer/ddintake/CiTestCovMapperV2Test.groovy +++ b/dd-trace-core/src/test/groovy/datadog/trace/civisibility/writer/ddintake/CiTestCovMapperV2Test.groovy @@ -4,6 +4,8 @@ import com.fasterxml.jackson.databind.ObjectMapper import datadog.communication.serialization.GrowableBuffer import datadog.communication.serialization.msgpack.MsgPackWriter import datadog.trace.api.civisibility.coverage.CoverageProbes +import datadog.trace.api.civisibility.coverage.CoverageStore +import datadog.trace.api.civisibility.coverage.NoOpProbes import datadog.trace.api.civisibility.coverage.TestReport import datadog.trace.api.civisibility.coverage.TestReportFileEntry import datadog.trace.api.civisibility.domain.TestContext @@ -25,7 +27,9 @@ class CiTestCovMapperV2Test extends DDCoreSpecification { def "test writes message"() { given: - def trace = givenTrace(new TestReport(1, 2, 3, [new TestReportFileEntry("source", [new TestReportFileEntry.Segment(4, -1, 4, -1, 11)])])) + def trace = givenTrace(new TestReport(1, 2, 3, [new TestReportFileEntry("source", BitSet.valueOf(new long[] { + 3, 5, 8 + }))])) when: def message = getMappedMessage(trace) @@ -41,7 +45,7 @@ class CiTestCovMapperV2Test extends DDCoreSpecification { files : [ [ filename: "source", - segments: [[4, -1, 4, -1, 11]] + bitmap: [3, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 8] ] ] ] @@ -52,14 +56,12 @@ class CiTestCovMapperV2Test extends DDCoreSpecification { def "test writes message with multiple files and multiple lines"() { given: def trace = givenTrace(new TestReport(1, 2, 3, [ - new TestReportFileEntry("sourceA", [ - new TestReportFileEntry.Segment(4, -1, 4, -1, 1), - new TestReportFileEntry.Segment(5, -1, 5, -1, 1) - ]), - new TestReportFileEntry("sourceB", [ - new TestReportFileEntry.Segment(20, -1, 20, -1, 1), - new TestReportFileEntry.Segment(21, -1, 21, -1, 1) - ]) + new TestReportFileEntry("sourceA", BitSet.valueOf(new long[] { + 3, 5, 8 + })), + new TestReportFileEntry("sourceB", BitSet.valueOf(new long[] { + 1, 255, 7 + })) ])) when: @@ -76,11 +78,11 @@ class CiTestCovMapperV2Test extends DDCoreSpecification { files : [ [ filename: "sourceA", - segments: [[4, -1, 4, -1, 1], [5, -1, 5, -1, 1]] + bitmap:[3, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 8] ], [ filename: "sourceB", - segments: [[20, -1, 20, -1, 1], [21, -1, 21, -1, 1]] + bitmap:[1, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 7] ] ] ] @@ -91,13 +93,17 @@ class CiTestCovMapperV2Test extends DDCoreSpecification { def "test writes message with multiple reports"() { given: def trace = givenTrace( - new TestReport(1, 2, 3, [ - new TestReportFileEntry("sourceA", [new TestReportFileEntry.Segment(14, -1, 14, -1, 1),]) - ]), - new TestReport(1, 2, 4, [ - new TestReportFileEntry("sourceB", [new TestReportFileEntry.Segment(24, -1, 24, -1, 1),]) - ]), - ) + new TestReport(1, 2, 3, [ + new TestReportFileEntry("sourceA", BitSet.valueOf(new long[] { + 2, 17, 41 + })) + ]), + new TestReport(1, 2, 4, [ + new TestReportFileEntry("sourceB", BitSet.valueOf(new long[] { + 11, 13, 55 + })) + ]), + ) when: def message = getMappedMessage(trace) @@ -113,7 +119,7 @@ class CiTestCovMapperV2Test extends DDCoreSpecification { files : [ [ filename: "sourceA", - segments: [[14, -1, 14, -1, 1]] + bitmap:[2, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 41] ] ] ], @@ -124,7 +130,7 @@ class CiTestCovMapperV2Test extends DDCoreSpecification { files : [ [ filename: "sourceB", - segments: [[24, -1, 24, -1, 1]] + bitmap:[11, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 55] ] ] ] @@ -134,7 +140,9 @@ class CiTestCovMapperV2Test extends DDCoreSpecification { def "skips spans that have no reports"() { given: - def trace = givenTrace(null, new TestReport(1, 2, 3, [new TestReportFileEntry("source", [new TestReportFileEntry.Segment(4, -1, 4, -1, 11)])]), null) + def trace = givenTrace(null, new TestReport(1, 2, 3, [new TestReportFileEntry("source", BitSet.valueOf(new long[] { + 83, 25, 48 + }))]), null) when: def message = getMappedMessage(trace) @@ -150,7 +158,7 @@ class CiTestCovMapperV2Test extends DDCoreSpecification { files : [ [ filename: "source", - segments: [[4, -1, 4, -1, 11]] + bitmap:[83, 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 48] ] ] ] @@ -161,11 +169,13 @@ class CiTestCovMapperV2Test extends DDCoreSpecification { def "skips empty reports"() { given: def trace = givenTrace( - new TestReport(1, 2, 3, [ - new TestReportFileEntry("source", [new TestReportFileEntry.Segment(4, -1, 4, -1, 11)]) - ]), - new TestReport(1, 2, 4, []) - ) + new TestReport(1, 2, 3, [ + new TestReportFileEntry("source", BitSet.valueOf(new long[] { + 33, 53, 87 + })) + ]), + new TestReport(1, 2, 4, []) + ) when: def message = getMappedMessage(trace) @@ -181,7 +191,7 @@ class CiTestCovMapperV2Test extends DDCoreSpecification { files : [ [ filename: "source", - segments: [[4, -1, 4, -1, 11]] + bitmap:[33, 0, 0, 0, 0, 0, 0, 0, 53, 0, 0, 0, 0, 0, 0, 0, 87] ] ] ] @@ -193,7 +203,9 @@ class CiTestCovMapperV2Test extends DDCoreSpecification { given: def trace = new ArrayList() - def report = new TestReport(1, 2, 3, [new TestReportFileEntry("source", [new TestReportFileEntry.Segment(4, -1, 4, -1, 11)])]) + def report = new TestReport(1, 2, 3, [new TestReportFileEntry("source", BitSet.valueOf(new long[] { + 3, 5, 8 + }))]) trace.add(buildSpan(0, InternalSpanTypes.TEST, PropagationTags.factory().empty(), [:], PrioritySampling.SAMPLER_KEEP, new DummyTestContext(new DummyReportHolder(report)))) trace.add(buildSpan(0, "testChild", PropagationTags.factory().empty(), [:], PrioritySampling.SAMPLER_KEEP, new DummyTestContext(new DummyReportHolder(report)))) @@ -212,7 +224,7 @@ class CiTestCovMapperV2Test extends DDCoreSpecification { files : [ [ filename: "source", - segments: [[4, -1, 4, -1, 11]] + bitmap:[3, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 8] ] ] ] @@ -244,7 +256,7 @@ class CiTestCovMapperV2Test extends DDCoreSpecification { return objectMapper.readValue(writtenBytes, Map) } - private static final class DummyReportHolder implements CoverageProbes { + private static final class DummyReportHolder implements CoverageStore { private final testReport DummyReportHolder(testReport) { @@ -257,33 +269,26 @@ class CiTestCovMapperV2Test extends DDCoreSpecification { } @Override - void record(Class clazz) { - } - - @Override - void record(Class clazz, long classId, int probeId) { - } - - @Override - void recordNonCodeResource(String absolutePath) { + boolean report(Long testSessionId, Long testSuiteId, long spanId) { + return false } @Override - boolean report(Long testSessionId, Long testSuiteId, long spanId) { - return false + CoverageProbes getProbes() { + return NoOpProbes.INSTANCE } } private static final class DummyTestContext implements TestContext { - private final CoverageProbes probeStore + private final CoverageStore coverageStore - DummyTestContext(CoverageProbes probeStore) { - this.probeStore = probeStore + DummyTestContext(CoverageStore coverageStore) { + this.coverageStore = coverageStore } @Override - CoverageProbes getCoverageProbeStore() { - return probeStore + CoverageStore getCoverageStore() { + return coverageStore } @Override diff --git a/internal-api/build.gradle b/internal-api/build.gradle index c3a9ef7d01f..3ab4633e5c4 100644 --- a/internal-api/build.gradle +++ b/internal-api/build.gradle @@ -99,7 +99,6 @@ excludedClassesCoverage += [ "datadog.trace.api.civisibility.coverage.NoOpProbes", "datadog.trace.api.civisibility.coverage.TestReport", "datadog.trace.api.civisibility.coverage.TestReportFileEntry", - "datadog.trace.api.civisibility.coverage.TestReportFileEntry.Segment", "datadog.trace.api.civisibility.events.BuildEventsHandler.ModuleInfo", "datadog.trace.api.civisibility.events.TestDescriptor", "datadog.trace.api.civisibility.events.TestSuiteDescriptor", diff --git a/internal-api/src/main/java/datadog/trace/api/civisibility/coverage/TestReportFileEntry.java b/internal-api/src/main/java/datadog/trace/api/civisibility/coverage/TestReportFileEntry.java index 3f2002d8a47..f5bda589b3e 100644 --- a/internal-api/src/main/java/datadog/trace/api/civisibility/coverage/TestReportFileEntry.java +++ b/internal-api/src/main/java/datadog/trace/api/civisibility/coverage/TestReportFileEntry.java @@ -1,24 +1,24 @@ package datadog.trace.api.civisibility.coverage; -import java.util.Collection; -import java.util.List; -import java.util.stream.Collectors; +import java.util.BitSet; +import javax.annotation.Nullable; public class TestReportFileEntry { private final String sourceFileName; - private final List segments; + private final @Nullable BitSet coveredLines; - public TestReportFileEntry(String sourceFileName, List segments) { + public TestReportFileEntry(String sourceFileName, @Nullable BitSet coveredLines) { this.sourceFileName = sourceFileName; - this.segments = segments; + this.coveredLines = coveredLines; } public String getSourceFileName() { return sourceFileName; } - public Collection getSegments() { - return segments; + @Nullable + public BitSet getCoveredLines() { + return coveredLines; } @Override @@ -27,65 +27,7 @@ public String toString() { + "sourceFileName='" + sourceFileName + "', lines=[" - + segments.stream().map(s -> String.valueOf(s.startLine)).collect(Collectors.joining(",")) + + coveredLines + "]}"; } - - public static class Segment implements Comparable { - private final int startLine; - private final int startColumn; - private final int endLine; - private final int endColumn; - private final int numberOfExecutions; - - public Segment( - int startLine, int startColumn, int endLine, int endColumn, int numberOfExecutions) { - this.startLine = startLine; - this.startColumn = startColumn; - this.endLine = endLine; - this.endColumn = endColumn; - this.numberOfExecutions = numberOfExecutions; - } - - public int getStartLine() { - return startLine; - } - - public int getStartColumn() { - return startColumn; - } - - public int getEndLine() { - return endLine; - } - - public int getEndColumn() { - return endColumn; - } - - public int getNumberOfExecutions() { - return numberOfExecutions; - } - - @Override - public int compareTo(Segment segment) { - return startLine - segment.startLine; - } - - @Override - public String toString() { - return "Segment{" - + "startLine=" - + startLine - + ", startColumn=" - + startColumn - + ", endLine=" - + endLine - + ", endColumn=" - + endColumn - + ", numberOfExecutions=" - + numberOfExecutions - + '}'; - } - } }