diff --git a/dd-java-agent/instrumentation/junit-5.3/build.gradle b/dd-java-agent/instrumentation/junit-5.3/build.gradle index cc51544c614..edc7f394191 100644 --- a/dd-java-agent/instrumentation/junit-5.3/build.gradle +++ b/dd-java-agent/instrumentation/junit-5.3/build.gradle @@ -22,6 +22,11 @@ muzzle { } } +ext { + latestDepTestMinJavaVersionForTests = JavaVersion.VERSION_17 +} + +addTestSuiteForDir('latest5Test', 'test') addTestSuiteForDir('latestDepTest', 'test') dependencies { @@ -36,6 +41,10 @@ dependencies { testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.12.0' testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-params', version: '5.12.0' + latest5TestImplementation group: 'org.junit.platform', name: 'junit-platform-launcher', version: '1.+' + latest5TestImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.+' + latest5TestImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-params', version: '5.+' + latestDepTestImplementation group: 'org.junit.platform', name: 'junit-platform-launcher', version: '+' latestDepTestImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '+' latestDepTestImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-params', version: '+' @@ -48,3 +57,9 @@ configurations.matching({ it.name.startsWith('test') }).each({ force group: 'org.junit.jupiter', name: 'junit-jupiter-params', version: '5.12.0' } }) + +tasks.named("compileLatestDepTestJava").configure { + setJavaVersion(it, 17) + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 +} diff --git a/dd-java-agent/instrumentation/junit-5.3/gradle.lockfile b/dd-java-agent/instrumentation/junit-5.3/gradle.lockfile index 2c814fc7e10..09e6a067d8b 100644 --- a/dd-java-agent/instrumentation/junit-5.3/gradle.lockfile +++ b/dd-java-agent/instrumentation/junit-5.3/gradle.lockfile @@ -53,7 +53,7 @@ commons-fileupload:commons-fileupload:1.5=latestDepTestCompileClasspath,latestDe commons-io:commons-io:2.11.0=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath de.thetaphi:forbiddenapis:3.8=compileClasspath info.picocli:picocli:4.6.3=latestDepTestRuntimeClasspath,testRuntimeClasspath -io.sqreen:libsqreen:15.0.1=latestDepTestRuntimeClasspath,testRuntimeClasspath +io.sqreen:libsqreen:16.0.0=latestDepTestRuntimeClasspath,testRuntimeClasspath javax.servlet:javax.servlet-api:3.1.0=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath jaxen:jaxen:1.2.0=spotbugs jline:jline:2.14.6=latestDepTestRuntimeClasspath,testRuntimeClasspath @@ -124,40 +124,36 @@ org.freemarker:freemarker:2.3.31=latestDepTestCompileClasspath,latestDepTestRunt org.gmetrics:GMetrics:2.1.0=codenarc org.hamcrest:hamcrest-core:1.3=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath org.hamcrest:hamcrest:2.2=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath -org.jacoco:org.jacoco.core:0.8.12=latestDepTestRuntimeClasspath,testRuntimeClasspath -org.jacoco:org.jacoco.report:0.8.12=latestDepTestRuntimeClasspath,testRuntimeClasspath +org.jacoco:org.jacoco.core:0.8.13=latestDepTestRuntimeClasspath,testRuntimeClasspath +org.jacoco:org.jacoco.report:0.8.13=latestDepTestRuntimeClasspath,testRuntimeClasspath org.jctools:jctools-core:3.3.0=instrumentPluginClasspath,latestDepTestRuntimeClasspath,muzzleTooling,runtimeClasspath,testRuntimeClasspath -org.jetbrains.kotlin:kotlin-stdlib-common:1.6.21=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath -org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.6.21=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath -org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.21=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath -org.jetbrains.kotlin:kotlin-stdlib:1.6.21=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath -org.jetbrains:annotations:13.0=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath org.jspecify:jspecify:1.0.0=latestDepTestCompileClasspath org.junit.jupiter:junit-jupiter-api:5.12.0=testCompileClasspath,testRuntimeClasspath org.junit.jupiter:junit-jupiter-api:5.3.0=compileClasspath -org.junit.jupiter:junit-jupiter-api:5.13.4=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath +org.junit.jupiter:junit-jupiter-api:6.0.0-RC2=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath org.junit.jupiter:junit-jupiter-engine:5.12.0=testCompileClasspath,testRuntimeClasspath -org.junit.jupiter:junit-jupiter-engine:5.13.4=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath +org.junit.jupiter:junit-jupiter-engine:6.0.0-RC2=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath org.junit.jupiter:junit-jupiter-params:5.12.0=testCompileClasspath,testRuntimeClasspath -org.junit.jupiter:junit-jupiter-params:5.13.4=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath +org.junit.jupiter:junit-jupiter-params:6.0.0-RC2=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath +org.junit.jupiter:junit-jupiter:5.12.0=testCompileClasspath,testRuntimeClasspath +org.junit.jupiter:junit-jupiter:6.0.0-RC2=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath org.junit.platform:junit-platform-commons:1.12.0=testCompileClasspath,testRuntimeClasspath org.junit.platform:junit-platform-commons:1.3.0=compileClasspath -org.junit.platform:junit-platform-commons:1.13.4=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath +org.junit.platform:junit-platform-commons:6.0.0-RC2=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath org.junit.platform:junit-platform-engine:1.12.0=testCompileClasspath,testRuntimeClasspath org.junit.platform:junit-platform-engine:1.3.0=compileClasspath -org.junit.platform:junit-platform-engine:1.13.4=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath +org.junit.platform:junit-platform-engine:6.0.0-RC2=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath org.junit.platform:junit-platform-launcher:1.12.0=testCompileClasspath,testRuntimeClasspath org.junit.platform:junit-platform-launcher:1.3.0=compileClasspath -org.junit.platform:junit-platform-launcher:1.13.4=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath +org.junit.platform:junit-platform-launcher:6.0.0-RC2=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath org.junit.platform:junit-platform-runner:1.12.0=testRuntimeClasspath org.junit.platform:junit-platform-runner:1.9.0=latestDepTestRuntimeClasspath org.junit.platform:junit-platform-suite-api:1.12.0=testRuntimeClasspath -org.junit.platform:junit-platform-suite-api:1.13.4=latestDepTestRuntimeClasspath +org.junit.platform:junit-platform-suite-api:6.0.0-RC2=latestDepTestRuntimeClasspath org.junit.platform:junit-platform-suite-commons:1.12.0=testRuntimeClasspath org.junit.platform:junit-platform-suite-commons:1.9.0=latestDepTestRuntimeClasspath org.junit:junit-bom:5.12.0=testCompileClasspath,testRuntimeClasspath -org.junit:junit-bom:5.9.1=spotbugs -org.junit:junit-bom:5.13.4=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath +org.junit:junit-bom:6.0.0-RC2=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath org.msgpack:jackson-dataformat-msgpack:0.9.6=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath org.msgpack:msgpack-core:0.9.6=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath org.objenesis:objenesis:3.3=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath diff --git a/dd-java-agent/instrumentation/junit-5.3/junit-5.8/build.gradle b/dd-java-agent/instrumentation/junit-5.3/junit-5.8/build.gradle index 340f04855ec..5aef3063630 100644 --- a/dd-java-agent/instrumentation/junit-5.3/junit-5.8/build.gradle +++ b/dd-java-agent/instrumentation/junit-5.3/junit-5.8/build.gradle @@ -23,6 +23,10 @@ muzzle { } } +ext { + latestDepTestMinJavaVersionForTests = JavaVersion.VERSION_17 +} + addTestSuiteForDir('latestDepTest', 'test') dependencies { @@ -52,3 +56,10 @@ configurations.matching({ it.name.startsWith('test') }).each({ force group: 'org.junit.jupiter', name: 'junit-jupiter-params', version: '5.12.0' } }) + +tasks.named("compileLatestDepTestJava").configure { + setJavaVersion(it, 17) + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 +} + diff --git a/dd-java-agent/instrumentation/junit-5.3/junit-5.8/gradle.lockfile b/dd-java-agent/instrumentation/junit-5.3/junit-5.8/gradle.lockfile index 654cce272f6..bf6bfcadea0 100644 --- a/dd-java-agent/instrumentation/junit-5.3/junit-5.8/gradle.lockfile +++ b/dd-java-agent/instrumentation/junit-5.3/junit-5.8/gradle.lockfile @@ -53,7 +53,7 @@ commons-fileupload:commons-fileupload:1.5=latestDepTestCompileClasspath,latestDe commons-io:commons-io:2.11.0=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath de.thetaphi:forbiddenapis:3.8=compileClasspath info.picocli:picocli:4.6.3=latestDepTestRuntimeClasspath,testRuntimeClasspath -io.sqreen:libsqreen:15.0.1=latestDepTestRuntimeClasspath,testRuntimeClasspath +io.sqreen:libsqreen:16.0.0=latestDepTestRuntimeClasspath,testRuntimeClasspath javax.servlet:javax.servlet-api:3.1.0=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath jaxen:jaxen:1.2.0=spotbugs jline:jline:2.14.6=latestDepTestRuntimeClasspath,testRuntimeClasspath @@ -123,42 +123,38 @@ org.freemarker:freemarker:2.3.31=latestDepTestCompileClasspath,latestDepTestRunt org.gmetrics:GMetrics:2.1.0=codenarc org.hamcrest:hamcrest-core:1.3=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath org.hamcrest:hamcrest:2.2=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath -org.jacoco:org.jacoco.core:0.8.12=latestDepTestRuntimeClasspath,testRuntimeClasspath -org.jacoco:org.jacoco.report:0.8.12=latestDepTestRuntimeClasspath,testRuntimeClasspath +org.jacoco:org.jacoco.core:0.8.13=latestDepTestRuntimeClasspath,testRuntimeClasspath +org.jacoco:org.jacoco.report:0.8.13=latestDepTestRuntimeClasspath,testRuntimeClasspath org.jctools:jctools-core:3.3.0=instrumentPluginClasspath,latestDepTestRuntimeClasspath,muzzleTooling,runtimeClasspath,testRuntimeClasspath -org.jetbrains.kotlin:kotlin-stdlib-common:1.6.21=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath -org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.6.21=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath -org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.21=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath -org.jetbrains.kotlin:kotlin-stdlib:1.6.21=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath -org.jetbrains:annotations:13.0=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath org.jspecify:jspecify:1.0.0=latestDepTestCompileClasspath org.junit.jupiter:junit-jupiter-api:5.12.0=testCompileClasspath,testRuntimeClasspath org.junit.jupiter:junit-jupiter-api:5.8.0=compileClasspath -org.junit.jupiter:junit-jupiter-api:5.13.4=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath +org.junit.jupiter:junit-jupiter-api:6.0.0-RC2=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath org.junit.jupiter:junit-jupiter-engine:5.12.0=testCompileClasspath,testRuntimeClasspath org.junit.jupiter:junit-jupiter-engine:5.8.0=compileClasspath -org.junit.jupiter:junit-jupiter-engine:5.13.4=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath +org.junit.jupiter:junit-jupiter-engine:6.0.0-RC2=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath org.junit.jupiter:junit-jupiter-params:5.12.0=testCompileClasspath,testRuntimeClasspath -org.junit.jupiter:junit-jupiter-params:5.13.4=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath +org.junit.jupiter:junit-jupiter-params:6.0.0-RC2=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath +org.junit.jupiter:junit-jupiter:5.12.0=testCompileClasspath,testRuntimeClasspath +org.junit.jupiter:junit-jupiter:6.0.0-RC2=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath org.junit.platform:junit-platform-commons:1.12.0=testCompileClasspath,testRuntimeClasspath org.junit.platform:junit-platform-commons:1.8.0=compileClasspath -org.junit.platform:junit-platform-commons:1.13.4=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath +org.junit.platform:junit-platform-commons:6.0.0-RC2=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath org.junit.platform:junit-platform-engine:1.12.0=testCompileClasspath,testRuntimeClasspath org.junit.platform:junit-platform-engine:1.8.0=compileClasspath -org.junit.platform:junit-platform-engine:1.13.4=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath +org.junit.platform:junit-platform-engine:6.0.0-RC2=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath org.junit.platform:junit-platform-launcher:1.12.0=testCompileClasspath,testRuntimeClasspath org.junit.platform:junit-platform-launcher:1.8.0=compileClasspath -org.junit.platform:junit-platform-launcher:1.13.4=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath +org.junit.platform:junit-platform-launcher:6.0.0-RC2=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath org.junit.platform:junit-platform-runner:1.12.0=testRuntimeClasspath org.junit.platform:junit-platform-runner:1.9.0=latestDepTestRuntimeClasspath org.junit.platform:junit-platform-suite-api:1.12.0=testRuntimeClasspath -org.junit.platform:junit-platform-suite-api:1.13.4=latestDepTestRuntimeClasspath +org.junit.platform:junit-platform-suite-api:6.0.0-RC2=latestDepTestRuntimeClasspath org.junit.platform:junit-platform-suite-commons:1.12.0=testRuntimeClasspath org.junit.platform:junit-platform-suite-commons:1.9.0=latestDepTestRuntimeClasspath org.junit:junit-bom:5.12.0=testCompileClasspath,testRuntimeClasspath org.junit:junit-bom:5.8.0=compileClasspath -org.junit:junit-bom:5.9.1=spotbugs -org.junit:junit-bom:1.13.4=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath +org.junit:junit-bom:6.0.0-RC2=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath org.msgpack:jackson-dataformat-msgpack:0.9.6=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath org.msgpack:msgpack-core:0.9.6=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath org.objenesis:objenesis:3.3=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath diff --git a/dd-java-agent/instrumentation/junit-5.3/src/main/java/datadog/trace/instrumentation/junit5/ExecutionRequestFactory.java b/dd-java-agent/instrumentation/junit-5.3/src/main/java/datadog/trace/instrumentation/junit5/ExecutionRequestFactory.java new file mode 100644 index 00000000000..6193122c11f --- /dev/null +++ b/dd-java-agent/instrumentation/junit-5.3/src/main/java/datadog/trace/instrumentation/junit5/ExecutionRequestFactory.java @@ -0,0 +1,118 @@ +package datadog.trace.instrumentation.junit5; + +import datadog.trace.util.MethodHandles; +import java.lang.invoke.MethodHandle; +import java.util.Arrays; +import java.util.function.BiFunction; +import org.junit.platform.commons.util.ClassLoaderUtils; +import org.junit.platform.engine.ConfigurationParameters; +import org.junit.platform.engine.EngineExecutionListener; +import org.junit.platform.engine.ExecutionRequest; +import org.junit.platform.engine.TestDescriptor; + +public class ExecutionRequestFactory { + + private static final MethodHandles METHOD_HANDLES = + new MethodHandles(ClassLoaderUtils.getDefaultClassLoader()); + + /* + * From 5.13.0-RC1 onwards ExecutionRequest requires two additional arguments on creation. + * - OutputDirectoryProvider outputDirectoryProvider + * - NamespacedHierarchicalStore requestLevelStore + */ + private static final MethodHandle GET_OUTPUT_DIRECTORY_PROVIDER = + METHOD_HANDLES.method(ExecutionRequest.class, "getOutputDirectoryProvider"); + private static final MethodHandle GET_STORE = + METHOD_HANDLES.method(ExecutionRequest.class, "getStore"); + /* + * From 6.0.0-M2 onwards CancellationToken is also required. + */ + private static final MethodHandle GET_CANCELLATION_TOKEN = + METHOD_HANDLES.method(ExecutionRequest.class, "getCancellationToken"); + + private static final String[] CREATE_PARAMETER_TYPES = + new String[] { + "org.junit.platform.engine.TestDescriptor", + "org.junit.platform.engine.EngineExecutionListener", + "org.junit.platform.engine.ConfigurationParameters", + "org.junit.platform.engine.reporting.OutputDirectoryProvider", + "org.junit.platform.engine.support.store.NamespacedHierarchicalStore", + "org.junit.platform.engine.CancellationToken" + }; + + private static final BiFunction + EXECUTION_REQUEST_CREATE = createExecutionRequestHandle(); + + private static BiFunction + createExecutionRequestHandle() { + // 6.0.0-M2 and later + if (GET_CANCELLATION_TOKEN != null) { + MethodHandle createMethod = + METHOD_HANDLES.method( + ExecutionRequest.class, + m -> + "create".equals(m.getName()) + && m.getParameterCount() == 6 + && Arrays.equals( + Arrays.stream(m.getParameterTypes()).map(Class::getName).toArray(), + CREATE_PARAMETER_TYPES)); + + return (request, listener) -> { + Object provider = METHOD_HANDLES.invoke(GET_OUTPUT_DIRECTORY_PROVIDER, request); + Object store = METHOD_HANDLES.invoke(GET_STORE, request); + Object cancellationToken = METHOD_HANDLES.invoke(GET_CANCELLATION_TOKEN, request); + return METHOD_HANDLES.invoke( + createMethod, + request.getRootTestDescriptor(), + listener, + request.getConfigurationParameters(), + provider, + store, + cancellationToken); + }; + } + + // 5.13.0-RC1 and later + if (GET_STORE != null && GET_OUTPUT_DIRECTORY_PROVIDER != null) { + MethodHandle createMethod = + METHOD_HANDLES.method( + ExecutionRequest.class, + m -> + "create".equals(m.getName()) + && m.getParameterCount() == 5 + && Arrays.equals( + Arrays.stream(m.getParameterTypes()).map(Class::getName).toArray(), + Arrays.copyOf(CREATE_PARAMETER_TYPES, 5))); + + return (request, listener) -> { + Object provider = METHOD_HANDLES.invoke(GET_OUTPUT_DIRECTORY_PROVIDER, request); + Object store = METHOD_HANDLES.invoke(GET_STORE, request); + return METHOD_HANDLES.invoke( + createMethod, + request.getRootTestDescriptor(), + listener, + request.getConfigurationParameters(), + provider, + store); + }; + } + + MethodHandle constructor = + METHOD_HANDLES.constructor( + ExecutionRequest.class, + TestDescriptor.class, + EngineExecutionListener.class, + ConfigurationParameters.class); + return (request, listener) -> + METHOD_HANDLES.invoke( + constructor, + request.getRootTestDescriptor(), + listener, + request.getConfigurationParameters()); + } + + public static ExecutionRequest createExecutionRequest( + ExecutionRequest request, EngineExecutionListener listener) { + return EXECUTION_REQUEST_CREATE.apply(request, listener); + } +} diff --git a/dd-java-agent/instrumentation/junit-5.3/src/main/java/datadog/trace/instrumentation/junit5/JUnit5Instrumentation.java b/dd-java-agent/instrumentation/junit-5.3/src/main/java/datadog/trace/instrumentation/junit5/JUnit5Instrumentation.java index 2b8c6c9d55c..9f65ba94abb 100644 --- a/dd-java-agent/instrumentation/junit-5.3/src/main/java/datadog/trace/instrumentation/junit5/JUnit5Instrumentation.java +++ b/dd-java-agent/instrumentation/junit-5.3/src/main/java/datadog/trace/instrumentation/junit5/JUnit5Instrumentation.java @@ -49,6 +49,7 @@ public ElementMatcher hierarchyMatcher() { public String[] helperClassNames() { return new String[] { packageName + ".JUnitPlatformUtils", + packageName + ".ExecutionRequestFactory", packageName + ".TestEventsHandlerHolder", packageName + ".TracingListener", packageName + ".CompositeEngineListener", @@ -117,7 +118,7 @@ public static void addTracingListener( EngineExecutionListener compositeListener = new CompositeEngineListener(tracingListener, originalListener); executionRequest = - JUnitPlatformUtils.createExecutionRequest(executionRequest, compositeListener); + ExecutionRequestFactory.createExecutionRequest(executionRequest, compositeListener); } // JUnit 5.3.0 and above diff --git a/dd-java-agent/instrumentation/junit-5.3/src/main/java/datadog/trace/instrumentation/junit5/JUnitPlatformUtils.java b/dd-java-agent/instrumentation/junit-5.3/src/main/java/datadog/trace/instrumentation/junit5/JUnitPlatformUtils.java index d2b62499aa1..14c12cbcc60 100644 --- a/dd-java-agent/instrumentation/junit-5.3/src/main/java/datadog/trace/instrumentation/junit5/JUnitPlatformUtils.java +++ b/dd-java-agent/instrumentation/junit-5.3/src/main/java/datadog/trace/instrumentation/junit5/JUnitPlatformUtils.java @@ -22,9 +22,6 @@ import org.junit.platform.commons.JUnitException; import org.junit.platform.commons.util.ClassLoaderUtils; import org.junit.platform.commons.util.ReflectionUtils; -import org.junit.platform.engine.ConfigurationParameters; -import org.junit.platform.engine.EngineExecutionListener; -import org.junit.platform.engine.ExecutionRequest; import org.junit.platform.engine.TestDescriptor; import org.junit.platform.engine.TestEngine; import org.junit.platform.engine.TestSource; @@ -112,71 +109,16 @@ private JUnitPlatformUtils() {} private static final MethodHandle GET_JAVA_METHOD = METHOD_HANDLES.method(MethodSource.class, "getJavaMethod"); - /* - * From 5.13.0-RC1 onwards ExecutionRequest requires two additional arguments on creation. - * - OutputDirectoryProvider outputDirectoryProvider - * - NamespacedHierarchicalStore requestLevelStore - */ - private static final MethodHandle GET_OUTPUT_DIRECTORY_PROVIDER = - METHOD_HANDLES.method(ExecutionRequest.class, "getOutputDirectoryProvider"); - private static final MethodHandle GET_STORE = - METHOD_HANDLES.method(ExecutionRequest.class, "getStore"); - private static final String[] CREATE_PARAMETER_TYPES = - new String[] { - "org.junit.platform.engine.TestDescriptor", - "org.junit.platform.engine.EngineExecutionListener", - "org.junit.platform.engine.ConfigurationParameters", - "org.junit.platform.engine.reporting.OutputDirectoryProvider", - "org.junit.platform.engine.support.store.NamespacedHierarchicalStore" - }; - private static final MethodHandle EXECUTION_REQUEST_CREATE = createExecutionRequestHandle(); - - private static MethodHandle createExecutionRequestHandle() { - if (GET_STORE != null && GET_OUTPUT_DIRECTORY_PROVIDER != null) { - return METHOD_HANDLES.method( - ExecutionRequest.class, - m -> - "create".equals(m.getName()) - && m.getParameterCount() == 5 - && Arrays.equals( - Arrays.stream(m.getParameterTypes()).map(Class::getName).toArray(), - CREATE_PARAMETER_TYPES)); - } else { - return METHOD_HANDLES.constructor( - ExecutionRequest.class, - TestDescriptor.class, - EngineExecutionListener.class, - ConfigurationParameters.class); - } - } - - public static ExecutionRequest createExecutionRequest( - ExecutionRequest request, EngineExecutionListener listener) { - if (GET_STORE != null && GET_OUTPUT_DIRECTORY_PROVIDER != null) { - Object provider = METHOD_HANDLES.invoke(GET_OUTPUT_DIRECTORY_PROVIDER, request); - Object store = METHOD_HANDLES.invoke(GET_STORE, request); - return METHOD_HANDLES.invoke( - EXECUTION_REQUEST_CREATE, - request.getRootTestDescriptor(), - listener, - request.getConfigurationParameters(), - provider, - store); - } else { - return METHOD_HANDLES.invoke( - EXECUTION_REQUEST_CREATE, - request.getRootTestDescriptor(), - listener, - request.getConfigurationParameters()); - } - } - private static Class getTestClass(MethodSource methodSource) { Class javaClass = METHOD_HANDLES.invoke(GET_JAVA_CLASS, methodSource); if (javaClass != null) { return javaClass; } - return ReflectionUtils.loadClass(methodSource.getClassName()).orElse(null); + try { + return ClassLoaderUtils.getDefaultClassLoader().loadClass(methodSource.getClassName()); + } catch (ClassNotFoundException e) { + return null; + } } private static Method getTestMethod(MethodSource methodSource) { diff --git a/dd-java-agent/instrumentation/junit-5.3/src/test/groovy/JUnit5Test.groovy b/dd-java-agent/instrumentation/junit-5.3/src/test/groovy/JUnit5Test.groovy index ef11eaff56c..fb9cda8bb51 100644 --- a/dd-java-agent/instrumentation/junit-5.3/src/test/groovy/JUnit5Test.groovy +++ b/dd-java-agent/instrumentation/junit-5.3/src/test/groovy/JUnit5Test.groovy @@ -61,7 +61,7 @@ class JUnit5Test extends CiVisibilityInstrumentationTest { testcaseName | success | tests "test-succeed" | true | [TestSucceed] "test-inheritance" | true | [TestInheritance] - "test-parameterized" | true | [TestParameterized] + "test-parameterized${version()}" | true | [TestParameterized] "test-repeated" | true | [TestRepeated] "test-template" | true | [TestTemplate] "test-factory" | true | [TestFactory] @@ -92,17 +92,17 @@ class JUnit5Test extends CiVisibilityInstrumentationTest { assertSpansData(testcaseName) where: - testcaseName | tests | skippedTests - "test-itr-skipping" | [TestFailedAndSucceed] | [ + testcaseName | tests | skippedTests + "test-itr-skipping" | [TestFailedAndSucceed] | [ new TestIdentifier("org.example.TestFailedAndSucceed", "test_another_succeed", null), new TestIdentifier("org.example.TestFailedAndSucceed", "test_failed", null) ] - "test-itr-skipping-parametrized" | [TestParameterized] | [ + "test-itr-skipping-parametrized${version()}" | [TestParameterized] | [ new TestIdentifier("org.example.TestParameterized", "test_parameterized", '{"metadata":{"test_name":"[1] 0, 0, 0, some:\\\"parameter\\\""}}') ] - "test-itr-unskippable" | [TestSucceedUnskippable] | [new TestIdentifier("org.example.TestSucceedUnskippable", "test_succeed", null)] - "test-itr-unskippable-suite" | [TestSucceedUnskippableSuite] | [new TestIdentifier("org.example.TestSucceedUnskippableSuite", "test_succeed", null)] - "test-itr-unskippable-not-skipped" | [TestSucceedUnskippable] | [] + "test-itr-unskippable" | [TestSucceedUnskippable] | [new TestIdentifier("org.example.TestSucceedUnskippable", "test_succeed", null)] + "test-itr-unskippable-suite" | [TestSucceedUnskippableSuite] | [new TestIdentifier("org.example.TestSucceedUnskippableSuite", "test_succeed", null)] + "test-itr-unskippable-not-skipped" | [TestSucceedUnskippable] | [] } def "test flaky retries #testcaseName"() { @@ -122,7 +122,7 @@ class JUnit5Test extends CiVisibilityInstrumentationTest { "test-retry-factory" | false | [TestFailedFactory] | [new TestFQN("org.example.TestFailedFactory", "test_factory")] "test-assumption-is-not-retried" | true | [TestAssumption] | [new TestFQN("org.example.TestAssumption", "test_fail_assumption")] "test-skipped-is-not-retried" | true | [TestSkipped] | [new TestFQN("org.example.TestSkipped", "test_skipped")] - "test-retry-parameterized" | false | [TestFailedParameterized] | [new TestFQN("org.example.TestFailedParameterized", "test_failed_parameterized")] + "test-retry-parameterized${version()}" | false | [TestFailedParameterized] | [new TestFQN("org.example.TestFailedParameterized", "test_failed_parameterized")] "test-expected-exception-is-not-retried" | true | [TestSucceedExpectedException] | [new TestFQN("org.example.TestSucceedExpectedException", "test_succeed")] } @@ -135,19 +135,19 @@ class JUnit5Test extends CiVisibilityInstrumentationTest { assertSpansData(testcaseName) where: - testcaseName | success | tests | knownTestsList - "test-efd-known-test" | true | [TestSucceed] | [new TestFQN("org.example.TestSucceed", "test_succeed")] - "test-efd-known-parameterized-test" | true | [TestParameterized] | [new TestFQN("org.example.TestParameterized", "test_parameterized")] - "test-efd-new-test" | true | [TestSucceed] | [] - "test-efd-new-parameterized-test" | true | [TestParameterized] | [] - "test-efd-known-tests-and-new-test" | false | [TestFailedAndSucceed] | [ + testcaseName | success | tests | knownTestsList + "test-efd-known-test" | true | [TestSucceed] | [new TestFQN("org.example.TestSucceed", "test_succeed")] + "test-efd-known-parameterized-test${version()}" | true | [TestParameterized] | [new TestFQN("org.example.TestParameterized", "test_parameterized")] + "test-efd-new-test" | true | [TestSucceed] | [] + "test-efd-new-parameterized-test${version()}" | true | [TestParameterized] | [] + "test-efd-known-tests-and-new-test" | false | [TestFailedAndSucceed] | [ new TestFQN("org.example.TestFailedAndSucceed", "test_failed"), new TestFQN("org.example.TestFailedAndSucceed", "test_succeed") ] - "test-efd-new-slow-test" | true | [TestSucceedSlow] | [] // is executed only twice - "test-efd-new-very-slow-test" | true | [TestSucceedVerySlow] | [] // is executed only once - "test-efd-faulty-session-threshold" | false | [TestFailedAndSucceed] | [] - "test-efd-skip-new-test" | true | [TestSucceedSkipEfd] | [] + "test-efd-new-slow-test" | true | [TestSucceedSlow] | [] // is executed only twice + "test-efd-new-very-slow-test" | true | [TestSucceedVerySlow] | [] // is executed only once + "test-efd-faulty-session-threshold" | false | [TestFailedAndSucceed] | [] + "test-efd-skip-new-test" | true | [TestSucceedSkipEfd] | [] } def "test impacted tests detection #testcaseName"() { @@ -173,9 +173,9 @@ class JUnit5Test extends CiVisibilityInstrumentationTest { assertSpansData(testcaseName) where: - testcaseName | tests | quarantined - "test-quarantined-failed" | [TestFailed] | [new TestFQN("org.example.TestFailed", "test_failed")] - "test-quarantined-failed-parameterized" | [TestFailedParameterized] | [new TestFQN("org.example.TestFailedParameterized", "test_failed_parameterized")] + testcaseName | tests | quarantined + "test-quarantined-failed" | [TestFailed] | [new TestFQN("org.example.TestFailed", "test_failed")] + "test-quarantined-failed-parameterized${version()}" | [TestFailedParameterized] | [new TestFQN("org.example.TestFailedParameterized", "test_failed_parameterized")] } def "test quarantined auto-retries #testcaseName"() { @@ -219,9 +219,9 @@ class JUnit5Test extends CiVisibilityInstrumentationTest { assertSpansData(testcaseName) where: - testcaseName | tests | disabled - "test-disabled-failed" | [TestFailed] | [new TestFQN("org.example.TestFailed", "test_failed")] - "test-disabled-failed-parameterized" | [TestFailedParameterized] | [new TestFQN("org.example.TestFailedParameterized", "test_failed_parameterized")] + testcaseName | tests | disabled + "test-disabled-failed" | [TestFailed] | [new TestFQN("org.example.TestFailed", "test_failed")] + "test-disabled-failed-parameterized${version()}" | [TestFailedParameterized] | [new TestFQN("org.example.TestFailedParameterized", "test_failed_parameterized")] } def "test attempt to fix #testcaseName"() { @@ -289,6 +289,11 @@ class JUnit5Test extends CiVisibilityInstrumentationTest { } } + private static String version() { + def version = JupiterTestEngine.package.getImplementationVersion() + return version.startsWith("6") ? "-6" : "" + } + @Override String instrumentedLibraryName() { return "junit5" diff --git a/dd-java-agent/instrumentation/junit-5.3/src/test/resources/test-disabled-failed-parameterized-6/coverages.ftl b/dd-java-agent/instrumentation/junit-5.3/src/test/resources/test-disabled-failed-parameterized-6/coverages.ftl new file mode 100644 index 00000000000..8878e547a79 --- /dev/null +++ b/dd-java-agent/instrumentation/junit-5.3/src/test/resources/test-disabled-failed-parameterized-6/coverages.ftl @@ -0,0 +1 @@ +[ ] \ No newline at end of file diff --git a/dd-java-agent/instrumentation/junit-5.3/src/test/resources/test-disabled-failed-parameterized-6/events.ftl b/dd-java-agent/instrumentation/junit-5.3/src/test/resources/test-disabled-failed-parameterized-6/events.ftl new file mode 100644 index 00000000000..a22c1e73dae --- /dev/null +++ b/dd-java-agent/instrumentation/junit-5.3/src/test/resources/test-disabled-failed-parameterized-6/events.ftl @@ -0,0 +1,155 @@ +[ { + "content" : { + "duration" : ${content_duration}, + "error" : 0, + "meta" : { + "_dd.p.tid" : ${content_meta__dd_p_tid}, + "_dd.profiling.ctx" : "test", + "_dd.tracer_host" : ${content_meta__dd_tracer_host}, + "component" : "junit5", + "dummy_ci_tag" : "dummy_ci_tag_value", + "env" : "none", + "language" : "jvm", + "library_version" : ${content_meta_library_version}, + "runtime-id" : ${content_meta_runtime_id}, + "span.kind" : "test_session_end", + "test.command" : "junit-5.3", + "test.framework" : "junit5", + "test.framework_version" : ${content_meta_test_framework_version}, + "test.status" : "skip", + "test.test_management.enabled" : "true", + "test.type" : "test", + "test_session.name" : "session-name" + }, + "metrics" : { + "_dd.host.vcpu_count" : ${content_metrics__dd_host_vcpu_count}, + "_dd.profiling.enabled" : 0, + "_dd.trace_span_attribute_schema" : 0, + "process_id" : ${content_metrics_process_id} + }, + "name" : "junit5.test_session", + "resource" : "junit-5.3", + "service" : "worker.org.gradle.process.internal.worker.gradleworkermain", + "start" : ${content_start}, + "test_session_id" : ${content_test_session_id} + }, + "type" : "test_session_end", + "version" : 1 +}, { + "content" : { + "duration" : ${content_duration_2}, + "error" : 0, + "meta" : { + "_dd.p.tid" : ${content_meta__dd_p_tid_2}, + "component" : "junit5", + "dummy_ci_tag" : "dummy_ci_tag_value", + "env" : "none", + "library_version" : ${content_meta_library_version}, + "span.kind" : "test_module_end", + "test.framework" : "junit5", + "test.framework_version" : ${content_meta_test_framework_version}, + "test.module" : "junit-5.3", + "test.status" : "skip", + "test.test_management.enabled" : "true", + "test.type" : "test", + "test_session.name" : "session-name" + }, + "metrics" : { + "_dd.host.vcpu_count" : ${content_metrics__dd_host_vcpu_count_2} + }, + "name" : "junit5.test_module", + "resource" : "junit-5.3", + "service" : "worker.org.gradle.process.internal.worker.gradleworkermain", + "start" : ${content_start_2}, + "test_module_id" : ${content_test_module_id}, + "test_session_id" : ${content_test_session_id} + }, + "type" : "test_module_end", + "version" : 1 +}, { + "content" : { + "duration" : ${content_duration_3}, + "error" : 0, + "meta" : { + "_dd.p.tid" : ${content_meta__dd_p_tid_3}, + "component" : "junit5", + "dummy_ci_tag" : "dummy_ci_tag_value", + "env" : "none", + "library_version" : ${content_meta_library_version}, + "span.kind" : "test_suite_end", + "test.codeowners" : "[\"owner1\",\"owner2\"]", + "test.framework" : "junit5", + "test.framework_version" : ${content_meta_test_framework_version}, + "test.module" : "junit-5.3", + "test.source.file" : "dummy_source_path", + "test.status" : "skip", + "test.suite" : "org.example.TestFailedParameterized", + "test.type" : "test", + "test_session.name" : "session-name" + }, + "metrics" : { + "_dd.host.vcpu_count" : ${content_metrics__dd_host_vcpu_count_3}, + "test.source.end" : 19, + "test.source.start" : 11 + }, + "name" : "junit5.test_suite", + "resource" : "org.example.TestFailedParameterized", + "service" : "worker.org.gradle.process.internal.worker.gradleworkermain", + "start" : ${content_start_3}, + "test_module_id" : ${content_test_module_id}, + "test_session_id" : ${content_test_session_id}, + "test_suite_id" : ${content_test_suite_id} + }, + "type" : "test_suite_end", + "version" : 1 +}, { + "content" : { + "duration" : ${content_duration_4}, + "error" : 0, + "meta" : { + "_dd.profiling.ctx" : "test", + "_dd.tracer_host" : ${content_meta__dd_tracer_host}, + "component" : "junit5", + "dummy_ci_tag" : "dummy_ci_tag_value", + "env" : "none", + "language" : "jvm", + "library_version" : ${content_meta_library_version}, + "runtime-id" : ${content_meta_runtime_id}, + "span.kind" : "test", + "test.codeowners" : "[\"owner1\",\"owner2\"]", + "test.framework" : "junit5", + "test.framework_version" : ${content_meta_test_framework_version}, + "test.module" : "junit-5.3", + "test.name" : "test_failed_parameterized", + "test.parameters" : "{\"metadata\":{\"test_name\":\"test_failed_parameterized(int, int, int)\"}}", + "test.skip_reason" : "Flaky test is disabled by Datadog", + "test.source.file" : "dummy_source_path", + "test.source.method" : "test_failed_parameterized(III)V", + "test.status" : "skip", + "test.suite" : "org.example.TestFailedParameterized", + "test.test_management.is_test_disabled" : "true", + "test.type" : "test", + "test_session.name" : "session-name" + }, + "metrics" : { + "_dd.host.vcpu_count" : ${content_metrics__dd_host_vcpu_count_4}, + "_dd.profiling.enabled" : 0, + "_dd.trace_span_attribute_schema" : 0, + "process_id" : ${content_metrics_process_id}, + "test.source.end" : 18, + "test.source.start" : 12 + }, + "name" : "junit5.test", + "parent_id" : ${content_parent_id}, + "resource" : "org.example.TestFailedParameterized.test_failed_parameterized", + "service" : "worker.org.gradle.process.internal.worker.gradleworkermain", + "span_id" : ${content_span_id}, + "start" : ${content_start_4}, + "test_module_id" : ${content_test_module_id}, + "test_session_id" : ${content_test_session_id}, + "test_suite_id" : ${content_test_suite_id}, + "trace_id" : ${content_trace_id} + }, + "type" : "test", + "version" : 2 +} ] \ No newline at end of file diff --git a/dd-java-agent/instrumentation/junit-5.3/src/test/resources/test-efd-known-parameterized-test-6/coverages.ftl b/dd-java-agent/instrumentation/junit-5.3/src/test/resources/test-efd-known-parameterized-test-6/coverages.ftl new file mode 100644 index 00000000000..8878e547a79 --- /dev/null +++ b/dd-java-agent/instrumentation/junit-5.3/src/test/resources/test-efd-known-parameterized-test-6/coverages.ftl @@ -0,0 +1 @@ +[ ] \ No newline at end of file diff --git a/dd-java-agent/instrumentation/junit-5.3/src/test/resources/test-efd-known-parameterized-test-6/events.ftl b/dd-java-agent/instrumentation/junit-5.3/src/test/resources/test-efd-known-parameterized-test-6/events.ftl new file mode 100644 index 00000000000..031ef5d33ac --- /dev/null +++ b/dd-java-agent/instrumentation/junit-5.3/src/test/resources/test-efd-known-parameterized-test-6/events.ftl @@ -0,0 +1,201 @@ +[ { + "content" : { + "duration" : ${content_duration}, + "error" : 0, + "meta" : { + "_dd.p.tid" : ${content_meta__dd_p_tid}, + "_dd.profiling.ctx" : "test", + "_dd.tracer_host" : ${content_meta__dd_tracer_host}, + "component" : "junit5", + "dummy_ci_tag" : "dummy_ci_tag_value", + "env" : "none", + "language" : "jvm", + "library_version" : ${content_meta_library_version}, + "runtime-id" : ${content_meta_runtime_id}, + "span.kind" : "test_session_end", + "test.command" : "junit-5.3", + "test.early_flake.enabled" : "true", + "test.framework" : "junit5", + "test.framework_version" : ${content_meta_test_framework_version}, + "test.status" : "pass", + "test.type" : "test", + "test_session.name" : "session-name" + }, + "metrics" : { + "_dd.host.vcpu_count" : ${content_metrics__dd_host_vcpu_count}, + "_dd.profiling.enabled" : 0, + "_dd.trace_span_attribute_schema" : 0, + "process_id" : ${content_metrics_process_id} + }, + "name" : "junit5.test_session", + "resource" : "junit-5.3", + "service" : "worker.org.gradle.process.internal.worker.gradleworkermain", + "start" : ${content_start}, + "test_session_id" : ${content_test_session_id} + }, + "type" : "test_session_end", + "version" : 1 +}, { + "content" : { + "duration" : ${content_duration_2}, + "error" : 0, + "meta" : { + "_dd.p.tid" : ${content_meta__dd_p_tid_2}, + "component" : "junit5", + "dummy_ci_tag" : "dummy_ci_tag_value", + "env" : "none", + "library_version" : ${content_meta_library_version}, + "span.kind" : "test_module_end", + "test.early_flake.enabled" : "true", + "test.framework" : "junit5", + "test.framework_version" : ${content_meta_test_framework_version}, + "test.module" : "junit-5.3", + "test.status" : "pass", + "test.type" : "test", + "test_session.name" : "session-name" + }, + "metrics" : { + "_dd.host.vcpu_count" : ${content_metrics__dd_host_vcpu_count_2} + }, + "name" : "junit5.test_module", + "resource" : "junit-5.3", + "service" : "worker.org.gradle.process.internal.worker.gradleworkermain", + "start" : ${content_start_2}, + "test_module_id" : ${content_test_module_id}, + "test_session_id" : ${content_test_session_id} + }, + "type" : "test_module_end", + "version" : 1 +}, { + "content" : { + "duration" : ${content_duration_3}, + "error" : 0, + "meta" : { + "_dd.p.tid" : ${content_meta__dd_p_tid_3}, + "component" : "junit5", + "dummy_ci_tag" : "dummy_ci_tag_value", + "env" : "none", + "library_version" : ${content_meta_library_version}, + "span.kind" : "test_suite_end", + "test.codeowners" : "[\"owner1\",\"owner2\"]", + "test.framework" : "junit5", + "test.framework_version" : ${content_meta_test_framework_version}, + "test.module" : "junit-5.3", + "test.source.file" : "dummy_source_path", + "test.status" : "pass", + "test.suite" : "org.example.TestParameterized", + "test.type" : "test", + "test_session.name" : "session-name" + }, + "metrics" : { + "_dd.host.vcpu_count" : ${content_metrics__dd_host_vcpu_count_3}, + "test.source.end" : 19, + "test.source.start" : 11 + }, + "name" : "junit5.test_suite", + "resource" : "org.example.TestParameterized", + "service" : "worker.org.gradle.process.internal.worker.gradleworkermain", + "start" : ${content_start_3}, + "test_module_id" : ${content_test_module_id}, + "test_session_id" : ${content_test_session_id}, + "test_suite_id" : ${content_test_suite_id} + }, + "type" : "test_suite_end", + "version" : 1 +}, { + "content" : { + "duration" : ${content_duration_4}, + "error" : 0, + "meta" : { + "_dd.profiling.ctx" : "test", + "_dd.tracer_host" : ${content_meta__dd_tracer_host}, + "component" : "junit5", + "dummy_ci_tag" : "dummy_ci_tag_value", + "env" : "none", + "language" : "jvm", + "library_version" : ${content_meta_library_version}, + "runtime-id" : ${content_meta_runtime_id}, + "span.kind" : "test", + "test.codeowners" : "[\"owner1\",\"owner2\"]", + "test.framework" : "junit5", + "test.framework_version" : ${content_meta_test_framework_version}, + "test.module" : "junit-5.3", + "test.name" : "test_parameterized", + "test.parameters" : "{\"metadata\":{\"test_name\":\"[1] 0, 0, \\\"0\\\", \\\"some:\\\\\\\"parameter\\\\\\\"\\\"\"}}", + "test.source.file" : "dummy_source_path", + "test.source.method" : "test_parameterized(IIILjava/lang/String;)V", + "test.status" : "pass", + "test.suite" : "org.example.TestParameterized", + "test.type" : "test", + "test_session.name" : "session-name" + }, + "metrics" : { + "_dd.host.vcpu_count" : ${content_metrics__dd_host_vcpu_count_4}, + "_dd.profiling.enabled" : 0, + "_dd.trace_span_attribute_schema" : 0, + "process_id" : ${content_metrics_process_id}, + "test.source.end" : 18, + "test.source.start" : 12 + }, + "name" : "junit5.test", + "parent_id" : ${content_parent_id}, + "resource" : "org.example.TestParameterized.test_parameterized", + "service" : "worker.org.gradle.process.internal.worker.gradleworkermain", + "span_id" : ${content_span_id}, + "start" : ${content_start_4}, + "test_module_id" : ${content_test_module_id}, + "test_session_id" : ${content_test_session_id}, + "test_suite_id" : ${content_test_suite_id}, + "trace_id" : ${content_trace_id} + }, + "type" : "test", + "version" : 2 +}, { + "content" : { + "duration" : ${content_duration_5}, + "error" : 0, + "meta" : { + "_dd.profiling.ctx" : "test", + "_dd.tracer_host" : ${content_meta__dd_tracer_host}, + "component" : "junit5", + "dummy_ci_tag" : "dummy_ci_tag_value", + "env" : "none", + "language" : "jvm", + "library_version" : ${content_meta_library_version}, + "runtime-id" : ${content_meta_runtime_id}, + "span.kind" : "test", + "test.codeowners" : "[\"owner1\",\"owner2\"]", + "test.framework" : "junit5", + "test.framework_version" : ${content_meta_test_framework_version}, + "test.module" : "junit-5.3", + "test.name" : "test_parameterized", + "test.parameters" : "{\"metadata\":{\"test_name\":\"[2] 1, 1, 2, \\\"some:\\\\\\\"parameter\\\\\\\"\\\"\"}}", + "test.source.file" : "dummy_source_path", + "test.source.method" : "test_parameterized(IIILjava/lang/String;)V", + "test.status" : "pass", + "test.suite" : "org.example.TestParameterized", + "test.type" : "test", + "test_session.name" : "session-name" + }, + "metrics" : { + "_dd.host.vcpu_count" : ${content_metrics__dd_host_vcpu_count_5}, + "_dd.profiling.enabled" : 0, + "_dd.trace_span_attribute_schema" : 0, + "process_id" : ${content_metrics_process_id}, + "test.source.end" : 18, + "test.source.start" : 12 + }, + "name" : "junit5.test", + "parent_id" : ${content_parent_id}, + "resource" : "org.example.TestParameterized.test_parameterized", + "service" : "worker.org.gradle.process.internal.worker.gradleworkermain", + "span_id" : ${content_span_id_2}, + "start" : ${content_start_5}, + "test_module_id" : ${content_test_module_id}, + "test_session_id" : ${content_test_session_id}, + "test_suite_id" : ${content_test_suite_id}, + "trace_id" : ${content_trace_id_2} + }, + "type" : "test", + "version" : 2 +} ] \ No newline at end of file diff --git a/dd-java-agent/instrumentation/junit-5.3/src/test/resources/test-efd-new-parameterized-test-6/coverages.ftl b/dd-java-agent/instrumentation/junit-5.3/src/test/resources/test-efd-new-parameterized-test-6/coverages.ftl new file mode 100644 index 00000000000..8878e547a79 --- /dev/null +++ b/dd-java-agent/instrumentation/junit-5.3/src/test/resources/test-efd-new-parameterized-test-6/coverages.ftl @@ -0,0 +1 @@ +[ ] \ No newline at end of file diff --git a/dd-java-agent/instrumentation/junit-5.3/src/test/resources/test-efd-new-parameterized-test-6/events.ftl b/dd-java-agent/instrumentation/junit-5.3/src/test/resources/test-efd-new-parameterized-test-6/events.ftl new file mode 100644 index 00000000000..2ec0ce4c113 --- /dev/null +++ b/dd-java-agent/instrumentation/junit-5.3/src/test/resources/test-efd-new-parameterized-test-6/events.ftl @@ -0,0 +1,409 @@ +[ { + "content" : { + "duration" : ${content_duration}, + "error" : 0, + "meta" : { + "_dd.p.tid" : ${content_meta__dd_p_tid}, + "_dd.profiling.ctx" : "test", + "_dd.tracer_host" : ${content_meta__dd_tracer_host}, + "component" : "junit5", + "dummy_ci_tag" : "dummy_ci_tag_value", + "env" : "none", + "language" : "jvm", + "library_version" : ${content_meta_library_version}, + "runtime-id" : ${content_meta_runtime_id}, + "span.kind" : "test_session_end", + "test.command" : "junit-5.3", + "test.early_flake.abort_reason" : "faulty", + "test.early_flake.enabled" : "true", + "test.framework" : "junit5", + "test.framework_version" : ${content_meta_test_framework_version}, + "test.status" : "pass", + "test.type" : "test", + "test_session.name" : "session-name" + }, + "metrics" : { + "_dd.host.vcpu_count" : ${content_metrics__dd_host_vcpu_count}, + "_dd.profiling.enabled" : 0, + "_dd.trace_span_attribute_schema" : 0, + "process_id" : ${content_metrics_process_id} + }, + "name" : "junit5.test_session", + "resource" : "junit-5.3", + "service" : "worker.org.gradle.process.internal.worker.gradleworkermain", + "start" : ${content_start}, + "test_session_id" : ${content_test_session_id} + }, + "type" : "test_session_end", + "version" : 1 +}, { + "content" : { + "duration" : ${content_duration_2}, + "error" : 0, + "meta" : { + "_dd.p.tid" : ${content_meta__dd_p_tid_2}, + "component" : "junit5", + "dummy_ci_tag" : "dummy_ci_tag_value", + "env" : "none", + "library_version" : ${content_meta_library_version}, + "span.kind" : "test_module_end", + "test.early_flake.abort_reason" : "faulty", + "test.early_flake.enabled" : "true", + "test.framework" : "junit5", + "test.framework_version" : ${content_meta_test_framework_version}, + "test.module" : "junit-5.3", + "test.status" : "pass", + "test.type" : "test", + "test_session.name" : "session-name" + }, + "metrics" : { + "_dd.host.vcpu_count" : ${content_metrics__dd_host_vcpu_count_2} + }, + "name" : "junit5.test_module", + "resource" : "junit-5.3", + "service" : "worker.org.gradle.process.internal.worker.gradleworkermain", + "start" : ${content_start_2}, + "test_module_id" : ${content_test_module_id}, + "test_session_id" : ${content_test_session_id} + }, + "type" : "test_module_end", + "version" : 1 +}, { + "content" : { + "duration" : ${content_duration_3}, + "error" : 0, + "meta" : { + "_dd.p.tid" : ${content_meta__dd_p_tid_3}, + "component" : "junit5", + "dummy_ci_tag" : "dummy_ci_tag_value", + "env" : "none", + "library_version" : ${content_meta_library_version}, + "span.kind" : "test_suite_end", + "test.codeowners" : "[\"owner1\",\"owner2\"]", + "test.framework" : "junit5", + "test.framework_version" : ${content_meta_test_framework_version}, + "test.module" : "junit-5.3", + "test.source.file" : "dummy_source_path", + "test.status" : "pass", + "test.suite" : "org.example.TestParameterized", + "test.type" : "test", + "test_session.name" : "session-name" + }, + "metrics" : { + "_dd.host.vcpu_count" : ${content_metrics__dd_host_vcpu_count_3}, + "test.source.end" : 19, + "test.source.start" : 11 + }, + "name" : "junit5.test_suite", + "resource" : "org.example.TestParameterized", + "service" : "worker.org.gradle.process.internal.worker.gradleworkermain", + "start" : ${content_start_3}, + "test_module_id" : ${content_test_module_id}, + "test_session_id" : ${content_test_session_id}, + "test_suite_id" : ${content_test_suite_id} + }, + "type" : "test_suite_end", + "version" : 1 +}, { + "content" : { + "duration" : ${content_duration_4}, + "error" : 0, + "meta" : { + "_dd.profiling.ctx" : "test", + "_dd.tracer_host" : ${content_meta__dd_tracer_host}, + "component" : "junit5", + "dummy_ci_tag" : "dummy_ci_tag_value", + "env" : "none", + "language" : "jvm", + "library_version" : ${content_meta_library_version}, + "runtime-id" : ${content_meta_runtime_id}, + "span.kind" : "test", + "test.codeowners" : "[\"owner1\",\"owner2\"]", + "test.framework" : "junit5", + "test.framework_version" : ${content_meta_test_framework_version}, + "test.is_new" : "true", + "test.module" : "junit-5.3", + "test.name" : "test_parameterized", + "test.parameters" : "{\"metadata\":{\"test_name\":\"[1] 0, 0, \\\"0\\\", \\\"some:\\\\\\\"parameter\\\\\\\"\\\"\"}}", + "test.source.file" : "dummy_source_path", + "test.source.method" : "test_parameterized(IIILjava/lang/String;)V", + "test.status" : "pass", + "test.suite" : "org.example.TestParameterized", + "test.type" : "test", + "test_session.name" : "session-name" + }, + "metrics" : { + "_dd.host.vcpu_count" : ${content_metrics__dd_host_vcpu_count_4}, + "_dd.profiling.enabled" : 0, + "_dd.trace_span_attribute_schema" : 0, + "process_id" : ${content_metrics_process_id}, + "test.source.end" : 18, + "test.source.start" : 12 + }, + "name" : "junit5.test", + "parent_id" : ${content_parent_id}, + "resource" : "org.example.TestParameterized.test_parameterized", + "service" : "worker.org.gradle.process.internal.worker.gradleworkermain", + "span_id" : ${content_span_id}, + "start" : ${content_start_4}, + "test_module_id" : ${content_test_module_id}, + "test_session_id" : ${content_test_session_id}, + "test_suite_id" : ${content_test_suite_id}, + "trace_id" : ${content_trace_id} + }, + "type" : "test", + "version" : 2 +}, { + "content" : { + "duration" : ${content_duration_5}, + "error" : 0, + "meta" : { + "_dd.profiling.ctx" : "test", + "_dd.tracer_host" : ${content_meta__dd_tracer_host}, + "component" : "junit5", + "dummy_ci_tag" : "dummy_ci_tag_value", + "env" : "none", + "language" : "jvm", + "library_version" : ${content_meta_library_version}, + "runtime-id" : ${content_meta_runtime_id}, + "span.kind" : "test", + "test.codeowners" : "[\"owner1\",\"owner2\"]", + "test.framework" : "junit5", + "test.framework_version" : ${content_meta_test_framework_version}, + "test.is_new" : "true", + "test.is_retry" : "true", + "test.module" : "junit-5.3", + "test.name" : "test_parameterized", + "test.parameters" : "{\"metadata\":{\"test_name\":\"[1] 0, 0, \\\"0\\\", \\\"some:\\\\\\\"parameter\\\\\\\"\\\"\"}}", + "test.retry_reason" : "early_flake_detection", + "test.source.file" : "dummy_source_path", + "test.source.method" : "test_parameterized(IIILjava/lang/String;)V", + "test.status" : "pass", + "test.suite" : "org.example.TestParameterized", + "test.type" : "test", + "test_session.name" : "session-name" + }, + "metrics" : { + "_dd.host.vcpu_count" : ${content_metrics__dd_host_vcpu_count_5}, + "_dd.profiling.enabled" : 0, + "_dd.trace_span_attribute_schema" : 0, + "process_id" : ${content_metrics_process_id}, + "test.source.end" : 18, + "test.source.start" : 12 + }, + "name" : "junit5.test", + "parent_id" : ${content_parent_id}, + "resource" : "org.example.TestParameterized.test_parameterized", + "service" : "worker.org.gradle.process.internal.worker.gradleworkermain", + "span_id" : ${content_span_id_2}, + "start" : ${content_start_5}, + "test_module_id" : ${content_test_module_id}, + "test_session_id" : ${content_test_session_id}, + "test_suite_id" : ${content_test_suite_id}, + "trace_id" : ${content_trace_id_2} + }, + "type" : "test", + "version" : 2 +}, { + "content" : { + "duration" : ${content_duration_6}, + "error" : 0, + "meta" : { + "_dd.profiling.ctx" : "test", + "_dd.tracer_host" : ${content_meta__dd_tracer_host}, + "component" : "junit5", + "dummy_ci_tag" : "dummy_ci_tag_value", + "env" : "none", + "language" : "jvm", + "library_version" : ${content_meta_library_version}, + "runtime-id" : ${content_meta_runtime_id}, + "span.kind" : "test", + "test.codeowners" : "[\"owner1\",\"owner2\"]", + "test.framework" : "junit5", + "test.framework_version" : ${content_meta_test_framework_version}, + "test.is_new" : "true", + "test.is_retry" : "true", + "test.module" : "junit-5.3", + "test.name" : "test_parameterized", + "test.parameters" : "{\"metadata\":{\"test_name\":\"[1] 0, 0, \\\"0\\\", \\\"some:\\\\\\\"parameter\\\\\\\"\\\"\"}}", + "test.retry_reason" : "early_flake_detection", + "test.source.file" : "dummy_source_path", + "test.source.method" : "test_parameterized(IIILjava/lang/String;)V", + "test.status" : "pass", + "test.suite" : "org.example.TestParameterized", + "test.type" : "test", + "test_session.name" : "session-name" + }, + "metrics" : { + "_dd.host.vcpu_count" : ${content_metrics__dd_host_vcpu_count_6}, + "_dd.profiling.enabled" : 0, + "_dd.trace_span_attribute_schema" : 0, + "process_id" : ${content_metrics_process_id}, + "test.source.end" : 18, + "test.source.start" : 12 + }, + "name" : "junit5.test", + "parent_id" : ${content_parent_id}, + "resource" : "org.example.TestParameterized.test_parameterized", + "service" : "worker.org.gradle.process.internal.worker.gradleworkermain", + "span_id" : ${content_span_id_3}, + "start" : ${content_start_6}, + "test_module_id" : ${content_test_module_id}, + "test_session_id" : ${content_test_session_id}, + "test_suite_id" : ${content_test_suite_id}, + "trace_id" : ${content_trace_id_3} + }, + "type" : "test", + "version" : 2 +}, { + "content" : { + "duration" : ${content_duration_7}, + "error" : 0, + "meta" : { + "_dd.profiling.ctx" : "test", + "_dd.tracer_host" : ${content_meta__dd_tracer_host}, + "component" : "junit5", + "dummy_ci_tag" : "dummy_ci_tag_value", + "env" : "none", + "language" : "jvm", + "library_version" : ${content_meta_library_version}, + "runtime-id" : ${content_meta_runtime_id}, + "span.kind" : "test", + "test.codeowners" : "[\"owner1\",\"owner2\"]", + "test.framework" : "junit5", + "test.framework_version" : ${content_meta_test_framework_version}, + "test.is_new" : "true", + "test.module" : "junit-5.3", + "test.name" : "test_parameterized", + "test.parameters" : "{\"metadata\":{\"test_name\":\"[2] 1, 1, 2, \\\"some:\\\\\\\"parameter\\\\\\\"\\\"\"}}", + "test.source.file" : "dummy_source_path", + "test.source.method" : "test_parameterized(IIILjava/lang/String;)V", + "test.status" : "pass", + "test.suite" : "org.example.TestParameterized", + "test.type" : "test", + "test_session.name" : "session-name" + }, + "metrics" : { + "_dd.host.vcpu_count" : ${content_metrics__dd_host_vcpu_count_7}, + "_dd.profiling.enabled" : 0, + "_dd.trace_span_attribute_schema" : 0, + "process_id" : ${content_metrics_process_id}, + "test.source.end" : 18, + "test.source.start" : 12 + }, + "name" : "junit5.test", + "parent_id" : ${content_parent_id}, + "resource" : "org.example.TestParameterized.test_parameterized", + "service" : "worker.org.gradle.process.internal.worker.gradleworkermain", + "span_id" : ${content_span_id_4}, + "start" : ${content_start_7}, + "test_module_id" : ${content_test_module_id}, + "test_session_id" : ${content_test_session_id}, + "test_suite_id" : ${content_test_suite_id}, + "trace_id" : ${content_trace_id_4} + }, + "type" : "test", + "version" : 2 +}, { + "content" : { + "duration" : ${content_duration_8}, + "error" : 0, + "meta" : { + "_dd.profiling.ctx" : "test", + "_dd.tracer_host" : ${content_meta__dd_tracer_host}, + "component" : "junit5", + "dummy_ci_tag" : "dummy_ci_tag_value", + "env" : "none", + "language" : "jvm", + "library_version" : ${content_meta_library_version}, + "runtime-id" : ${content_meta_runtime_id}, + "span.kind" : "test", + "test.codeowners" : "[\"owner1\",\"owner2\"]", + "test.framework" : "junit5", + "test.framework_version" : ${content_meta_test_framework_version}, + "test.is_new" : "true", + "test.is_retry" : "true", + "test.module" : "junit-5.3", + "test.name" : "test_parameterized", + "test.parameters" : "{\"metadata\":{\"test_name\":\"[2] 1, 1, 2, \\\"some:\\\\\\\"parameter\\\\\\\"\\\"\"}}", + "test.retry_reason" : "early_flake_detection", + "test.source.file" : "dummy_source_path", + "test.source.method" : "test_parameterized(IIILjava/lang/String;)V", + "test.status" : "pass", + "test.suite" : "org.example.TestParameterized", + "test.type" : "test", + "test_session.name" : "session-name" + }, + "metrics" : { + "_dd.host.vcpu_count" : ${content_metrics__dd_host_vcpu_count_8}, + "_dd.profiling.enabled" : 0, + "_dd.trace_span_attribute_schema" : 0, + "process_id" : ${content_metrics_process_id}, + "test.source.end" : 18, + "test.source.start" : 12 + }, + "name" : "junit5.test", + "parent_id" : ${content_parent_id}, + "resource" : "org.example.TestParameterized.test_parameterized", + "service" : "worker.org.gradle.process.internal.worker.gradleworkermain", + "span_id" : ${content_span_id_5}, + "start" : ${content_start_8}, + "test_module_id" : ${content_test_module_id}, + "test_session_id" : ${content_test_session_id}, + "test_suite_id" : ${content_test_suite_id}, + "trace_id" : ${content_trace_id_5} + }, + "type" : "test", + "version" : 2 +}, { + "content" : { + "duration" : ${content_duration_9}, + "error" : 0, + "meta" : { + "_dd.profiling.ctx" : "test", + "_dd.tracer_host" : ${content_meta__dd_tracer_host}, + "component" : "junit5", + "dummy_ci_tag" : "dummy_ci_tag_value", + "env" : "none", + "language" : "jvm", + "library_version" : ${content_meta_library_version}, + "runtime-id" : ${content_meta_runtime_id}, + "span.kind" : "test", + "test.codeowners" : "[\"owner1\",\"owner2\"]", + "test.framework" : "junit5", + "test.framework_version" : ${content_meta_test_framework_version}, + "test.is_new" : "true", + "test.is_retry" : "true", + "test.module" : "junit-5.3", + "test.name" : "test_parameterized", + "test.parameters" : "{\"metadata\":{\"test_name\":\"[2] 1, 1, 2, \\\"some:\\\\\\\"parameter\\\\\\\"\\\"\"}}", + "test.retry_reason" : "early_flake_detection", + "test.source.file" : "dummy_source_path", + "test.source.method" : "test_parameterized(IIILjava/lang/String;)V", + "test.status" : "pass", + "test.suite" : "org.example.TestParameterized", + "test.type" : "test", + "test_session.name" : "session-name" + }, + "metrics" : { + "_dd.host.vcpu_count" : ${content_metrics__dd_host_vcpu_count_9}, + "_dd.profiling.enabled" : 0, + "_dd.trace_span_attribute_schema" : 0, + "process_id" : ${content_metrics_process_id}, + "test.source.end" : 18, + "test.source.start" : 12 + }, + "name" : "junit5.test", + "parent_id" : ${content_parent_id}, + "resource" : "org.example.TestParameterized.test_parameterized", + "service" : "worker.org.gradle.process.internal.worker.gradleworkermain", + "span_id" : ${content_span_id_6}, + "start" : ${content_start_9}, + "test_module_id" : ${content_test_module_id}, + "test_session_id" : ${content_test_session_id}, + "test_suite_id" : ${content_test_suite_id}, + "trace_id" : ${content_trace_id_6} + }, + "type" : "test", + "version" : 2 +} ] \ No newline at end of file diff --git a/dd-java-agent/instrumentation/junit-5.3/src/test/resources/test-itr-skipping-parametrized-6/coverages.ftl b/dd-java-agent/instrumentation/junit-5.3/src/test/resources/test-itr-skipping-parametrized-6/coverages.ftl new file mode 100644 index 00000000000..8878e547a79 --- /dev/null +++ b/dd-java-agent/instrumentation/junit-5.3/src/test/resources/test-itr-skipping-parametrized-6/coverages.ftl @@ -0,0 +1 @@ +[ ] \ No newline at end of file diff --git a/dd-java-agent/instrumentation/junit-5.3/src/test/resources/test-itr-skipping-parametrized-6/events.ftl b/dd-java-agent/instrumentation/junit-5.3/src/test/resources/test-itr-skipping-parametrized-6/events.ftl new file mode 100644 index 00000000000..4c97002d731 --- /dev/null +++ b/dd-java-agent/instrumentation/junit-5.3/src/test/resources/test-itr-skipping-parametrized-6/events.ftl @@ -0,0 +1,207 @@ +[ { + "content" : { + "duration" : ${content_duration}, + "error" : 0, + "meta" : { + "_dd.p.tid" : ${content_meta__dd_p_tid}, + "_dd.profiling.ctx" : "test", + "_dd.tracer_host" : ${content_meta__dd_tracer_host}, + "component" : "junit5", + "dummy_ci_tag" : "dummy_ci_tag_value", + "env" : "none", + "language" : "jvm", + "library_version" : ${content_meta_library_version}, + "runtime-id" : ${content_meta_runtime_id}, + "span.kind" : "test_session_end", + "test.command" : "junit-5.3", + "test.framework" : "junit5", + "test.framework_version" : ${content_meta_test_framework_version}, + "test.itr.tests_skipping.enabled" : "true", + "test.itr.tests_skipping.type" : "test", + "test.status" : "pass", + "test.type" : "test", + "test_session.name" : "session-name" + }, + "metrics" : { + "_dd.host.vcpu_count" : ${content_metrics__dd_host_vcpu_count}, + "_dd.profiling.enabled" : 0, + "_dd.trace_span_attribute_schema" : 0, + "process_id" : ${content_metrics_process_id}, + "test.itr.tests_skipping.count" : 0 + }, + "name" : "junit5.test_session", + "resource" : "junit-5.3", + "service" : "worker.org.gradle.process.internal.worker.gradleworkermain", + "start" : ${content_start}, + "test_session_id" : ${content_test_session_id} + }, + "type" : "test_session_end", + "version" : 1 +}, { + "content" : { + "duration" : ${content_duration_2}, + "error" : 0, + "meta" : { + "_dd.p.tid" : ${content_meta__dd_p_tid_2}, + "component" : "junit5", + "dummy_ci_tag" : "dummy_ci_tag_value", + "env" : "none", + "library_version" : ${content_meta_library_version}, + "span.kind" : "test_module_end", + "test.framework" : "junit5", + "test.framework_version" : ${content_meta_test_framework_version}, + "test.itr.tests_skipping.enabled" : "true", + "test.itr.tests_skipping.type" : "test", + "test.module" : "junit-5.3", + "test.status" : "pass", + "test.type" : "test", + "test_session.name" : "session-name" + }, + "metrics" : { + "_dd.host.vcpu_count" : ${content_metrics__dd_host_vcpu_count_2}, + "test.itr.tests_skipping.count" : 0 + }, + "name" : "junit5.test_module", + "resource" : "junit-5.3", + "service" : "worker.org.gradle.process.internal.worker.gradleworkermain", + "start" : ${content_start_2}, + "test_module_id" : ${content_test_module_id}, + "test_session_id" : ${content_test_session_id} + }, + "type" : "test_module_end", + "version" : 1 +}, { + "content" : { + "duration" : ${content_duration_3}, + "error" : 0, + "meta" : { + "_dd.p.tid" : ${content_meta__dd_p_tid_3}, + "component" : "junit5", + "dummy_ci_tag" : "dummy_ci_tag_value", + "env" : "none", + "library_version" : ${content_meta_library_version}, + "span.kind" : "test_suite_end", + "test.codeowners" : "[\"owner1\",\"owner2\"]", + "test.framework" : "junit5", + "test.framework_version" : ${content_meta_test_framework_version}, + "test.module" : "junit-5.3", + "test.source.file" : "dummy_source_path", + "test.status" : "pass", + "test.suite" : "org.example.TestParameterized", + "test.type" : "test", + "test_session.name" : "session-name" + }, + "metrics" : { + "_dd.host.vcpu_count" : ${content_metrics__dd_host_vcpu_count_3}, + "test.source.end" : 19, + "test.source.start" : 11 + }, + "name" : "junit5.test_suite", + "resource" : "org.example.TestParameterized", + "service" : "worker.org.gradle.process.internal.worker.gradleworkermain", + "start" : ${content_start_3}, + "test_module_id" : ${content_test_module_id}, + "test_session_id" : ${content_test_session_id}, + "test_suite_id" : ${content_test_suite_id} + }, + "type" : "test_suite_end", + "version" : 1 +}, { + "content" : { + "duration" : ${content_duration_4}, + "error" : 0, + "itr_correlation_id" : "itrCorrelationId", + "meta" : { + "_dd.profiling.ctx" : "test", + "_dd.tracer_host" : ${content_meta__dd_tracer_host}, + "component" : "junit5", + "dummy_ci_tag" : "dummy_ci_tag_value", + "env" : "none", + "language" : "jvm", + "library_version" : ${content_meta_library_version}, + "runtime-id" : ${content_meta_runtime_id}, + "span.kind" : "test", + "test.codeowners" : "[\"owner1\",\"owner2\"]", + "test.framework" : "junit5", + "test.framework_version" : ${content_meta_test_framework_version}, + "test.module" : "junit-5.3", + "test.name" : "test_parameterized", + "test.parameters" : "{\"metadata\":{\"test_name\":\"[1] 0, 0, \\\"0\\\", \\\"some:\\\\\\\"parameter\\\\\\\"\\\"\"}}", + "test.source.file" : "dummy_source_path", + "test.source.method" : "test_parameterized(IIILjava/lang/String;)V", + "test.status" : "pass", + "test.suite" : "org.example.TestParameterized", + "test.type" : "test", + "test_session.name" : "session-name" + }, + "metrics" : { + "_dd.host.vcpu_count" : ${content_metrics__dd_host_vcpu_count_4}, + "_dd.profiling.enabled" : 0, + "_dd.trace_span_attribute_schema" : 0, + "process_id" : ${content_metrics_process_id}, + "test.source.end" : 18, + "test.source.start" : 12 + }, + "name" : "junit5.test", + "parent_id" : ${content_parent_id}, + "resource" : "org.example.TestParameterized.test_parameterized", + "service" : "worker.org.gradle.process.internal.worker.gradleworkermain", + "span_id" : ${content_span_id}, + "start" : ${content_start_4}, + "test_module_id" : ${content_test_module_id}, + "test_session_id" : ${content_test_session_id}, + "test_suite_id" : ${content_test_suite_id}, + "trace_id" : ${content_trace_id} + }, + "type" : "test", + "version" : 2 +}, { + "content" : { + "duration" : ${content_duration_5}, + "error" : 0, + "itr_correlation_id" : "itrCorrelationId", + "meta" : { + "_dd.profiling.ctx" : "test", + "_dd.tracer_host" : ${content_meta__dd_tracer_host}, + "component" : "junit5", + "dummy_ci_tag" : "dummy_ci_tag_value", + "env" : "none", + "language" : "jvm", + "library_version" : ${content_meta_library_version}, + "runtime-id" : ${content_meta_runtime_id}, + "span.kind" : "test", + "test.codeowners" : "[\"owner1\",\"owner2\"]", + "test.framework" : "junit5", + "test.framework_version" : ${content_meta_test_framework_version}, + "test.module" : "junit-5.3", + "test.name" : "test_parameterized", + "test.parameters" : "{\"metadata\":{\"test_name\":\"[2] 1, 1, 2, \\\"some:\\\\\\\"parameter\\\\\\\"\\\"\"}}", + "test.source.file" : "dummy_source_path", + "test.source.method" : "test_parameterized(IIILjava/lang/String;)V", + "test.status" : "pass", + "test.suite" : "org.example.TestParameterized", + "test.type" : "test", + "test_session.name" : "session-name" + }, + "metrics" : { + "_dd.host.vcpu_count" : ${content_metrics__dd_host_vcpu_count_5}, + "_dd.profiling.enabled" : 0, + "_dd.trace_span_attribute_schema" : 0, + "process_id" : ${content_metrics_process_id}, + "test.source.end" : 18, + "test.source.start" : 12 + }, + "name" : "junit5.test", + "parent_id" : ${content_parent_id}, + "resource" : "org.example.TestParameterized.test_parameterized", + "service" : "worker.org.gradle.process.internal.worker.gradleworkermain", + "span_id" : ${content_span_id_2}, + "start" : ${content_start_5}, + "test_module_id" : ${content_test_module_id}, + "test_session_id" : ${content_test_session_id}, + "test_suite_id" : ${content_test_suite_id}, + "trace_id" : ${content_trace_id_2} + }, + "type" : "test", + "version" : 2 +} ] \ No newline at end of file diff --git a/dd-java-agent/instrumentation/junit-5.3/src/test/resources/test-parameterized-6/coverages.ftl b/dd-java-agent/instrumentation/junit-5.3/src/test/resources/test-parameterized-6/coverages.ftl new file mode 100644 index 00000000000..8878e547a79 --- /dev/null +++ b/dd-java-agent/instrumentation/junit-5.3/src/test/resources/test-parameterized-6/coverages.ftl @@ -0,0 +1 @@ +[ ] \ No newline at end of file diff --git a/dd-java-agent/instrumentation/junit-5.3/src/test/resources/test-parameterized-6/events.ftl b/dd-java-agent/instrumentation/junit-5.3/src/test/resources/test-parameterized-6/events.ftl new file mode 100644 index 00000000000..c8d91088fea --- /dev/null +++ b/dd-java-agent/instrumentation/junit-5.3/src/test/resources/test-parameterized-6/events.ftl @@ -0,0 +1,199 @@ +[ { + "content" : { + "duration" : ${content_duration}, + "error" : 0, + "meta" : { + "_dd.p.tid" : ${content_meta__dd_p_tid}, + "_dd.profiling.ctx" : "test", + "_dd.tracer_host" : ${content_meta__dd_tracer_host}, + "component" : "junit5", + "dummy_ci_tag" : "dummy_ci_tag_value", + "env" : "none", + "language" : "jvm", + "library_version" : ${content_meta_library_version}, + "runtime-id" : ${content_meta_runtime_id}, + "span.kind" : "test_session_end", + "test.command" : "junit-5.3", + "test.framework" : "junit5", + "test.framework_version" : ${content_meta_test_framework_version}, + "test.status" : "pass", + "test.type" : "test", + "test_session.name" : "session-name" + }, + "metrics" : { + "_dd.host.vcpu_count" : ${content_metrics__dd_host_vcpu_count}, + "_dd.profiling.enabled" : 0, + "_dd.trace_span_attribute_schema" : 0, + "process_id" : ${content_metrics_process_id} + }, + "name" : "junit5.test_session", + "resource" : "junit-5.3", + "service" : "worker.org.gradle.process.internal.worker.gradleworkermain", + "start" : ${content_start}, + "test_session_id" : ${content_test_session_id} + }, + "type" : "test_session_end", + "version" : 1 +}, { + "content" : { + "duration" : ${content_duration_2}, + "error" : 0, + "meta" : { + "_dd.p.tid" : ${content_meta__dd_p_tid_2}, + "component" : "junit5", + "dummy_ci_tag" : "dummy_ci_tag_value", + "env" : "none", + "library_version" : ${content_meta_library_version}, + "span.kind" : "test_module_end", + "test.framework" : "junit5", + "test.framework_version" : ${content_meta_test_framework_version}, + "test.module" : "junit-5.3", + "test.status" : "pass", + "test.type" : "test", + "test_session.name" : "session-name" + }, + "metrics" : { + "_dd.host.vcpu_count" : ${content_metrics__dd_host_vcpu_count_2} + }, + "name" : "junit5.test_module", + "resource" : "junit-5.3", + "service" : "worker.org.gradle.process.internal.worker.gradleworkermain", + "start" : ${content_start_2}, + "test_module_id" : ${content_test_module_id}, + "test_session_id" : ${content_test_session_id} + }, + "type" : "test_module_end", + "version" : 1 +}, { + "content" : { + "duration" : ${content_duration_3}, + "error" : 0, + "meta" : { + "_dd.p.tid" : ${content_meta__dd_p_tid_3}, + "component" : "junit5", + "dummy_ci_tag" : "dummy_ci_tag_value", + "env" : "none", + "library_version" : ${content_meta_library_version}, + "span.kind" : "test_suite_end", + "test.codeowners" : "[\"owner1\",\"owner2\"]", + "test.framework" : "junit5", + "test.framework_version" : ${content_meta_test_framework_version}, + "test.module" : "junit-5.3", + "test.source.file" : "dummy_source_path", + "test.status" : "pass", + "test.suite" : "org.example.TestParameterized", + "test.type" : "test", + "test_session.name" : "session-name" + }, + "metrics" : { + "_dd.host.vcpu_count" : ${content_metrics__dd_host_vcpu_count_3}, + "test.source.end" : 19, + "test.source.start" : 11 + }, + "name" : "junit5.test_suite", + "resource" : "org.example.TestParameterized", + "service" : "worker.org.gradle.process.internal.worker.gradleworkermain", + "start" : ${content_start_3}, + "test_module_id" : ${content_test_module_id}, + "test_session_id" : ${content_test_session_id}, + "test_suite_id" : ${content_test_suite_id} + }, + "type" : "test_suite_end", + "version" : 1 +}, { + "content" : { + "duration" : ${content_duration_4}, + "error" : 0, + "meta" : { + "_dd.profiling.ctx" : "test", + "_dd.tracer_host" : ${content_meta__dd_tracer_host}, + "component" : "junit5", + "dummy_ci_tag" : "dummy_ci_tag_value", + "env" : "none", + "language" : "jvm", + "library_version" : ${content_meta_library_version}, + "runtime-id" : ${content_meta_runtime_id}, + "span.kind" : "test", + "test.codeowners" : "[\"owner1\",\"owner2\"]", + "test.framework" : "junit5", + "test.framework_version" : ${content_meta_test_framework_version}, + "test.module" : "junit-5.3", + "test.name" : "test_parameterized", + "test.parameters" : "{\"metadata\":{\"test_name\":\"[1] 0, 0, \\\"0\\\", \\\"some:\\\\\\\"parameter\\\\\\\"\\\"\"}}", + "test.source.file" : "dummy_source_path", + "test.source.method" : "test_parameterized(IIILjava/lang/String;)V", + "test.status" : "pass", + "test.suite" : "org.example.TestParameterized", + "test.type" : "test", + "test_session.name" : "session-name" + }, + "metrics" : { + "_dd.host.vcpu_count" : ${content_metrics__dd_host_vcpu_count_4}, + "_dd.profiling.enabled" : 0, + "_dd.trace_span_attribute_schema" : 0, + "process_id" : ${content_metrics_process_id}, + "test.source.end" : 18, + "test.source.start" : 12 + }, + "name" : "junit5.test", + "parent_id" : ${content_parent_id}, + "resource" : "org.example.TestParameterized.test_parameterized", + "service" : "worker.org.gradle.process.internal.worker.gradleworkermain", + "span_id" : ${content_span_id}, + "start" : ${content_start_4}, + "test_module_id" : ${content_test_module_id}, + "test_session_id" : ${content_test_session_id}, + "test_suite_id" : ${content_test_suite_id}, + "trace_id" : ${content_trace_id} + }, + "type" : "test", + "version" : 2 +}, { + "content" : { + "duration" : ${content_duration_5}, + "error" : 0, + "meta" : { + "_dd.profiling.ctx" : "test", + "_dd.tracer_host" : ${content_meta__dd_tracer_host}, + "component" : "junit5", + "dummy_ci_tag" : "dummy_ci_tag_value", + "env" : "none", + "language" : "jvm", + "library_version" : ${content_meta_library_version}, + "runtime-id" : ${content_meta_runtime_id}, + "span.kind" : "test", + "test.codeowners" : "[\"owner1\",\"owner2\"]", + "test.framework" : "junit5", + "test.framework_version" : ${content_meta_test_framework_version}, + "test.module" : "junit-5.3", + "test.name" : "test_parameterized", + "test.parameters" : "{\"metadata\":{\"test_name\":\"[2] 1, 1, 2, \\\"some:\\\\\\\"parameter\\\\\\\"\\\"\"}}", + "test.source.file" : "dummy_source_path", + "test.source.method" : "test_parameterized(IIILjava/lang/String;)V", + "test.status" : "pass", + "test.suite" : "org.example.TestParameterized", + "test.type" : "test", + "test_session.name" : "session-name" + }, + "metrics" : { + "_dd.host.vcpu_count" : ${content_metrics__dd_host_vcpu_count_5}, + "_dd.profiling.enabled" : 0, + "_dd.trace_span_attribute_schema" : 0, + "process_id" : ${content_metrics_process_id}, + "test.source.end" : 18, + "test.source.start" : 12 + }, + "name" : "junit5.test", + "parent_id" : ${content_parent_id}, + "resource" : "org.example.TestParameterized.test_parameterized", + "service" : "worker.org.gradle.process.internal.worker.gradleworkermain", + "span_id" : ${content_span_id_2}, + "start" : ${content_start_5}, + "test_module_id" : ${content_test_module_id}, + "test_session_id" : ${content_test_session_id}, + "test_suite_id" : ${content_test_suite_id}, + "trace_id" : ${content_trace_id_2} + }, + "type" : "test", + "version" : 2 +} ] \ No newline at end of file diff --git a/dd-java-agent/instrumentation/junit-5.3/src/test/resources/test-quarantined-failed-parameterized-6/coverages.ftl b/dd-java-agent/instrumentation/junit-5.3/src/test/resources/test-quarantined-failed-parameterized-6/coverages.ftl new file mode 100644 index 00000000000..8878e547a79 --- /dev/null +++ b/dd-java-agent/instrumentation/junit-5.3/src/test/resources/test-quarantined-failed-parameterized-6/coverages.ftl @@ -0,0 +1 @@ +[ ] \ No newline at end of file diff --git a/dd-java-agent/instrumentation/junit-5.3/src/test/resources/test-quarantined-failed-parameterized-6/events.ftl b/dd-java-agent/instrumentation/junit-5.3/src/test/resources/test-quarantined-failed-parameterized-6/events.ftl new file mode 100644 index 00000000000..dab5cc36583 --- /dev/null +++ b/dd-java-agent/instrumentation/junit-5.3/src/test/resources/test-quarantined-failed-parameterized-6/events.ftl @@ -0,0 +1,211 @@ +[ { + "content" : { + "duration" : ${content_duration}, + "error" : 0, + "meta" : { + "_dd.p.tid" : ${content_meta__dd_p_tid}, + "_dd.profiling.ctx" : "test", + "_dd.tracer_host" : ${content_meta__dd_tracer_host}, + "component" : "junit5", + "dummy_ci_tag" : "dummy_ci_tag_value", + "env" : "none", + "language" : "jvm", + "library_version" : ${content_meta_library_version}, + "runtime-id" : ${content_meta_runtime_id}, + "span.kind" : "test_session_end", + "test.command" : "junit-5.3", + "test.framework" : "junit5", + "test.framework_version" : ${content_meta_test_framework_version}, + "test.status" : "pass", + "test.test_management.enabled" : "true", + "test.type" : "test", + "test_session.name" : "session-name" + }, + "metrics" : { + "_dd.host.vcpu_count" : ${content_metrics__dd_host_vcpu_count}, + "_dd.profiling.enabled" : 0, + "_dd.trace_span_attribute_schema" : 0, + "process_id" : ${content_metrics_process_id} + }, + "name" : "junit5.test_session", + "resource" : "junit-5.3", + "service" : "worker.org.gradle.process.internal.worker.gradleworkermain", + "start" : ${content_start}, + "test_session_id" : ${content_test_session_id} + }, + "type" : "test_session_end", + "version" : 1 +}, { + "content" : { + "duration" : ${content_duration_2}, + "error" : 0, + "meta" : { + "_dd.p.tid" : ${content_meta__dd_p_tid_2}, + "component" : "junit5", + "dummy_ci_tag" : "dummy_ci_tag_value", + "env" : "none", + "library_version" : ${content_meta_library_version}, + "span.kind" : "test_module_end", + "test.framework" : "junit5", + "test.framework_version" : ${content_meta_test_framework_version}, + "test.module" : "junit-5.3", + "test.status" : "pass", + "test.test_management.enabled" : "true", + "test.type" : "test", + "test_session.name" : "session-name" + }, + "metrics" : { + "_dd.host.vcpu_count" : ${content_metrics__dd_host_vcpu_count_2} + }, + "name" : "junit5.test_module", + "resource" : "junit-5.3", + "service" : "worker.org.gradle.process.internal.worker.gradleworkermain", + "start" : ${content_start_2}, + "test_module_id" : ${content_test_module_id}, + "test_session_id" : ${content_test_session_id} + }, + "type" : "test_module_end", + "version" : 1 +}, { + "content" : { + "duration" : ${content_duration_3}, + "error" : 0, + "meta" : { + "_dd.p.tid" : ${content_meta__dd_p_tid_3}, + "component" : "junit5", + "dummy_ci_tag" : "dummy_ci_tag_value", + "env" : "none", + "library_version" : ${content_meta_library_version}, + "span.kind" : "test_suite_end", + "test.codeowners" : "[\"owner1\",\"owner2\"]", + "test.framework" : "junit5", + "test.framework_version" : ${content_meta_test_framework_version}, + "test.module" : "junit-5.3", + "test.source.file" : "dummy_source_path", + "test.status" : "pass", + "test.suite" : "org.example.TestFailedParameterized", + "test.type" : "test", + "test_session.name" : "session-name" + }, + "metrics" : { + "_dd.host.vcpu_count" : ${content_metrics__dd_host_vcpu_count_3}, + "test.source.end" : 19, + "test.source.start" : 11 + }, + "name" : "junit5.test_suite", + "resource" : "org.example.TestFailedParameterized", + "service" : "worker.org.gradle.process.internal.worker.gradleworkermain", + "start" : ${content_start_3}, + "test_module_id" : ${content_test_module_id}, + "test_session_id" : ${content_test_session_id}, + "test_suite_id" : ${content_test_suite_id} + }, + "type" : "test_suite_end", + "version" : 1 +}, { + "content" : { + "duration" : ${content_duration_4}, + "error" : 1, + "meta" : { + "_dd.profiling.ctx" : "test", + "_dd.tracer_host" : ${content_meta__dd_tracer_host}, + "component" : "junit5", + "dummy_ci_tag" : "dummy_ci_tag_value", + "env" : "none", + "error.message" : ${content_meta_error_message}, + "error.stack" : ${content_meta_error_stack}, + "error.type" : "org.opentest4j.AssertionFailedError", + "language" : "jvm", + "library_version" : ${content_meta_library_version}, + "runtime-id" : ${content_meta_runtime_id}, + "span.kind" : "test", + "test.codeowners" : "[\"owner1\",\"owner2\"]", + "test.failure_suppressed" : "true", + "test.framework" : "junit5", + "test.framework_version" : ${content_meta_test_framework_version}, + "test.module" : "junit-5.3", + "test.name" : "test_failed_parameterized", + "test.parameters" : "{\"metadata\":{\"test_name\":\"[1] 0, 0, 42\"}}", + "test.source.file" : "dummy_source_path", + "test.source.method" : "test_failed_parameterized(III)V", + "test.status" : "fail", + "test.suite" : "org.example.TestFailedParameterized", + "test.test_management.is_quarantined" : "true", + "test.type" : "test", + "test_session.name" : "session-name" + }, + "metrics" : { + "_dd.host.vcpu_count" : ${content_metrics__dd_host_vcpu_count_4}, + "_dd.profiling.enabled" : 0, + "_dd.trace_span_attribute_schema" : 0, + "process_id" : ${content_metrics_process_id}, + "test.source.end" : 18, + "test.source.start" : 12 + }, + "name" : "junit5.test", + "parent_id" : ${content_parent_id}, + "resource" : "org.example.TestFailedParameterized.test_failed_parameterized", + "service" : "worker.org.gradle.process.internal.worker.gradleworkermain", + "span_id" : ${content_span_id}, + "start" : ${content_start_4}, + "test_module_id" : ${content_test_module_id}, + "test_session_id" : ${content_test_session_id}, + "test_suite_id" : ${content_test_suite_id}, + "trace_id" : ${content_trace_id} + }, + "type" : "test", + "version" : 2 +}, { + "content" : { + "duration" : ${content_duration_5}, + "error" : 1, + "meta" : { + "_dd.profiling.ctx" : "test", + "_dd.tracer_host" : ${content_meta__dd_tracer_host}, + "component" : "junit5", + "dummy_ci_tag" : "dummy_ci_tag_value", + "env" : "none", + "error.message" : ${content_meta_error_message_2}, + "error.stack" : ${content_meta_error_stack_2}, + "error.type" : "org.opentest4j.AssertionFailedError", + "language" : "jvm", + "library_version" : ${content_meta_library_version}, + "runtime-id" : ${content_meta_runtime_id}, + "span.kind" : "test", + "test.codeowners" : "[\"owner1\",\"owner2\"]", + "test.failure_suppressed" : "true", + "test.framework" : "junit5", + "test.framework_version" : ${content_meta_test_framework_version}, + "test.module" : "junit-5.3", + "test.name" : "test_failed_parameterized", + "test.parameters" : "{\"metadata\":{\"test_name\":\"[2] 1, 1, 42\"}}", + "test.source.file" : "dummy_source_path", + "test.source.method" : "test_failed_parameterized(III)V", + "test.status" : "fail", + "test.suite" : "org.example.TestFailedParameterized", + "test.test_management.is_quarantined" : "true", + "test.type" : "test", + "test_session.name" : "session-name" + }, + "metrics" : { + "_dd.host.vcpu_count" : ${content_metrics__dd_host_vcpu_count_5}, + "_dd.profiling.enabled" : 0, + "_dd.trace_span_attribute_schema" : 0, + "process_id" : ${content_metrics_process_id}, + "test.source.end" : 18, + "test.source.start" : 12 + }, + "name" : "junit5.test", + "parent_id" : ${content_parent_id}, + "resource" : "org.example.TestFailedParameterized.test_failed_parameterized", + "service" : "worker.org.gradle.process.internal.worker.gradleworkermain", + "span_id" : ${content_span_id_2}, + "start" : ${content_start_5}, + "test_module_id" : ${content_test_module_id}, + "test_session_id" : ${content_test_session_id}, + "test_suite_id" : ${content_test_suite_id}, + "trace_id" : ${content_trace_id_2} + }, + "type" : "test", + "version" : 2 +} ] \ No newline at end of file diff --git a/dd-java-agent/instrumentation/junit-5.3/src/test/resources/test-retry-parameterized-6/coverages.ftl b/dd-java-agent/instrumentation/junit-5.3/src/test/resources/test-retry-parameterized-6/coverages.ftl new file mode 100644 index 00000000000..8878e547a79 --- /dev/null +++ b/dd-java-agent/instrumentation/junit-5.3/src/test/resources/test-retry-parameterized-6/coverages.ftl @@ -0,0 +1 @@ +[ ] \ No newline at end of file diff --git a/dd-java-agent/instrumentation/junit-5.3/src/test/resources/test-retry-parameterized-6/events.ftl b/dd-java-agent/instrumentation/junit-5.3/src/test/resources/test-retry-parameterized-6/events.ftl new file mode 100644 index 00000000000..101386b5d2a --- /dev/null +++ b/dd-java-agent/instrumentation/junit-5.3/src/test/resources/test-retry-parameterized-6/events.ftl @@ -0,0 +1,639 @@ +[ { + "content" : { + "duration" : ${content_duration}, + "error" : 0, + "meta" : { + "_dd.p.tid" : ${content_meta__dd_p_tid}, + "_dd.profiling.ctx" : "test", + "_dd.tracer_host" : ${content_meta__dd_tracer_host}, + "component" : "junit5", + "dummy_ci_tag" : "dummy_ci_tag_value", + "env" : "none", + "language" : "jvm", + "library_version" : ${content_meta_library_version}, + "runtime-id" : ${content_meta_runtime_id}, + "span.kind" : "test_session_end", + "test.command" : "junit-5.3", + "test.framework" : "junit5", + "test.framework_version" : ${content_meta_test_framework_version}, + "test.status" : "fail", + "test.type" : "test", + "test_session.name" : "session-name" + }, + "metrics" : { + "_dd.host.vcpu_count" : ${content_metrics__dd_host_vcpu_count}, + "_dd.profiling.enabled" : 0, + "_dd.trace_span_attribute_schema" : 0, + "process_id" : ${content_metrics_process_id} + }, + "name" : "junit5.test_session", + "resource" : "junit-5.3", + "service" : "worker.org.gradle.process.internal.worker.gradleworkermain", + "start" : ${content_start}, + "test_session_id" : ${content_test_session_id} + }, + "type" : "test_session_end", + "version" : 1 +}, { + "content" : { + "duration" : ${content_duration_2}, + "error" : 0, + "meta" : { + "_dd.p.tid" : ${content_meta__dd_p_tid_2}, + "component" : "junit5", + "dummy_ci_tag" : "dummy_ci_tag_value", + "env" : "none", + "library_version" : ${content_meta_library_version}, + "span.kind" : "test_module_end", + "test.framework" : "junit5", + "test.framework_version" : ${content_meta_test_framework_version}, + "test.module" : "junit-5.3", + "test.status" : "fail", + "test.type" : "test", + "test_session.name" : "session-name" + }, + "metrics" : { + "_dd.host.vcpu_count" : ${content_metrics__dd_host_vcpu_count_2} + }, + "name" : "junit5.test_module", + "resource" : "junit-5.3", + "service" : "worker.org.gradle.process.internal.worker.gradleworkermain", + "start" : ${content_start_2}, + "test_module_id" : ${content_test_module_id}, + "test_session_id" : ${content_test_session_id} + }, + "type" : "test_module_end", + "version" : 1 +}, { + "content" : { + "duration" : ${content_duration_3}, + "error" : 0, + "meta" : { + "_dd.p.tid" : ${content_meta__dd_p_tid_3}, + "component" : "junit5", + "dummy_ci_tag" : "dummy_ci_tag_value", + "env" : "none", + "library_version" : ${content_meta_library_version}, + "span.kind" : "test_suite_end", + "test.codeowners" : "[\"owner1\",\"owner2\"]", + "test.framework" : "junit5", + "test.framework_version" : ${content_meta_test_framework_version}, + "test.module" : "junit-5.3", + "test.source.file" : "dummy_source_path", + "test.status" : "fail", + "test.suite" : "org.example.TestFailedParameterized", + "test.type" : "test", + "test_session.name" : "session-name" + }, + "metrics" : { + "_dd.host.vcpu_count" : ${content_metrics__dd_host_vcpu_count_3}, + "test.source.end" : 19, + "test.source.start" : 11 + }, + "name" : "junit5.test_suite", + "resource" : "org.example.TestFailedParameterized", + "service" : "worker.org.gradle.process.internal.worker.gradleworkermain", + "start" : ${content_start_3}, + "test_module_id" : ${content_test_module_id}, + "test_session_id" : ${content_test_session_id}, + "test_suite_id" : ${content_test_suite_id} + }, + "type" : "test_suite_end", + "version" : 1 +}, { + "content" : { + "duration" : ${content_duration_4}, + "error" : 1, + "meta" : { + "_dd.profiling.ctx" : "test", + "_dd.tracer_host" : ${content_meta__dd_tracer_host}, + "component" : "junit5", + "dummy_ci_tag" : "dummy_ci_tag_value", + "env" : "none", + "error.message" : ${content_meta_error_message}, + "error.stack" : ${content_meta_error_stack}, + "error.type" : "org.opentest4j.AssertionFailedError", + "language" : "jvm", + "library_version" : ${content_meta_library_version}, + "runtime-id" : ${content_meta_runtime_id}, + "span.kind" : "test", + "test.codeowners" : "[\"owner1\",\"owner2\"]", + "test.failure_suppressed" : "true", + "test.framework" : "junit5", + "test.framework_version" : ${content_meta_test_framework_version}, + "test.module" : "junit-5.3", + "test.name" : "test_failed_parameterized", + "test.parameters" : "{\"metadata\":{\"test_name\":\"[1] 0, 0, 42\"}}", + "test.source.file" : "dummy_source_path", + "test.source.method" : "test_failed_parameterized(III)V", + "test.status" : "fail", + "test.suite" : "org.example.TestFailedParameterized", + "test.type" : "test", + "test_session.name" : "session-name" + }, + "metrics" : { + "_dd.host.vcpu_count" : ${content_metrics__dd_host_vcpu_count_4}, + "_dd.profiling.enabled" : 0, + "_dd.trace_span_attribute_schema" : 0, + "process_id" : ${content_metrics_process_id}, + "test.source.end" : 18, + "test.source.start" : 12 + }, + "name" : "junit5.test", + "parent_id" : ${content_parent_id}, + "resource" : "org.example.TestFailedParameterized.test_failed_parameterized", + "service" : "worker.org.gradle.process.internal.worker.gradleworkermain", + "span_id" : ${content_span_id}, + "start" : ${content_start_4}, + "test_module_id" : ${content_test_module_id}, + "test_session_id" : ${content_test_session_id}, + "test_suite_id" : ${content_test_suite_id}, + "trace_id" : ${content_trace_id} + }, + "type" : "test", + "version" : 2 +}, { + "content" : { + "duration" : ${content_duration_5}, + "error" : 1, + "meta" : { + "_dd.profiling.ctx" : "test", + "_dd.tracer_host" : ${content_meta__dd_tracer_host}, + "component" : "junit5", + "dummy_ci_tag" : "dummy_ci_tag_value", + "env" : "none", + "error.message" : ${content_meta_error_message}, + "error.stack" : ${content_meta_error_stack_2}, + "error.type" : "org.opentest4j.AssertionFailedError", + "language" : "jvm", + "library_version" : ${content_meta_library_version}, + "runtime-id" : ${content_meta_runtime_id}, + "span.kind" : "test", + "test.codeowners" : "[\"owner1\",\"owner2\"]", + "test.failure_suppressed" : "true", + "test.framework" : "junit5", + "test.framework_version" : ${content_meta_test_framework_version}, + "test.is_retry" : "true", + "test.module" : "junit-5.3", + "test.name" : "test_failed_parameterized", + "test.parameters" : "{\"metadata\":{\"test_name\":\"[1] 0, 0, 42\"}}", + "test.retry_reason" : "auto_test_retry", + "test.source.file" : "dummy_source_path", + "test.source.method" : "test_failed_parameterized(III)V", + "test.status" : "fail", + "test.suite" : "org.example.TestFailedParameterized", + "test.type" : "test", + "test_session.name" : "session-name" + }, + "metrics" : { + "_dd.host.vcpu_count" : ${content_metrics__dd_host_vcpu_count_5}, + "_dd.profiling.enabled" : 0, + "_dd.trace_span_attribute_schema" : 0, + "process_id" : ${content_metrics_process_id}, + "test.source.end" : 18, + "test.source.start" : 12 + }, + "name" : "junit5.test", + "parent_id" : ${content_parent_id}, + "resource" : "org.example.TestFailedParameterized.test_failed_parameterized", + "service" : "worker.org.gradle.process.internal.worker.gradleworkermain", + "span_id" : ${content_span_id_2}, + "start" : ${content_start_5}, + "test_module_id" : ${content_test_module_id}, + "test_session_id" : ${content_test_session_id}, + "test_suite_id" : ${content_test_suite_id}, + "trace_id" : ${content_trace_id_2} + }, + "type" : "test", + "version" : 2 +}, { + "content" : { + "duration" : ${content_duration_6}, + "error" : 1, + "meta" : { + "_dd.profiling.ctx" : "test", + "_dd.tracer_host" : ${content_meta__dd_tracer_host}, + "component" : "junit5", + "dummy_ci_tag" : "dummy_ci_tag_value", + "env" : "none", + "error.message" : ${content_meta_error_message}, + "error.stack" : ${content_meta_error_stack_3}, + "error.type" : "org.opentest4j.AssertionFailedError", + "language" : "jvm", + "library_version" : ${content_meta_library_version}, + "runtime-id" : ${content_meta_runtime_id}, + "span.kind" : "test", + "test.codeowners" : "[\"owner1\",\"owner2\"]", + "test.failure_suppressed" : "true", + "test.framework" : "junit5", + "test.framework_version" : ${content_meta_test_framework_version}, + "test.is_retry" : "true", + "test.module" : "junit-5.3", + "test.name" : "test_failed_parameterized", + "test.parameters" : "{\"metadata\":{\"test_name\":\"[1] 0, 0, 42\"}}", + "test.retry_reason" : "auto_test_retry", + "test.source.file" : "dummy_source_path", + "test.source.method" : "test_failed_parameterized(III)V", + "test.status" : "fail", + "test.suite" : "org.example.TestFailedParameterized", + "test.type" : "test", + "test_session.name" : "session-name" + }, + "metrics" : { + "_dd.host.vcpu_count" : ${content_metrics__dd_host_vcpu_count_6}, + "_dd.profiling.enabled" : 0, + "_dd.trace_span_attribute_schema" : 0, + "process_id" : ${content_metrics_process_id}, + "test.source.end" : 18, + "test.source.start" : 12 + }, + "name" : "junit5.test", + "parent_id" : ${content_parent_id}, + "resource" : "org.example.TestFailedParameterized.test_failed_parameterized", + "service" : "worker.org.gradle.process.internal.worker.gradleworkermain", + "span_id" : ${content_span_id_3}, + "start" : ${content_start_6}, + "test_module_id" : ${content_test_module_id}, + "test_session_id" : ${content_test_session_id}, + "test_suite_id" : ${content_test_suite_id}, + "trace_id" : ${content_trace_id_3} + }, + "type" : "test", + "version" : 2 +}, { + "content" : { + "duration" : ${content_duration_7}, + "error" : 1, + "meta" : { + "_dd.profiling.ctx" : "test", + "_dd.tracer_host" : ${content_meta__dd_tracer_host}, + "component" : "junit5", + "dummy_ci_tag" : "dummy_ci_tag_value", + "env" : "none", + "error.message" : ${content_meta_error_message}, + "error.stack" : ${content_meta_error_stack_4}, + "error.type" : "org.opentest4j.AssertionFailedError", + "language" : "jvm", + "library_version" : ${content_meta_library_version}, + "runtime-id" : ${content_meta_runtime_id}, + "span.kind" : "test", + "test.codeowners" : "[\"owner1\",\"owner2\"]", + "test.failure_suppressed" : "true", + "test.framework" : "junit5", + "test.framework_version" : ${content_meta_test_framework_version}, + "test.is_retry" : "true", + "test.module" : "junit-5.3", + "test.name" : "test_failed_parameterized", + "test.parameters" : "{\"metadata\":{\"test_name\":\"[1] 0, 0, 42\"}}", + "test.retry_reason" : "auto_test_retry", + "test.source.file" : "dummy_source_path", + "test.source.method" : "test_failed_parameterized(III)V", + "test.status" : "fail", + "test.suite" : "org.example.TestFailedParameterized", + "test.type" : "test", + "test_session.name" : "session-name" + }, + "metrics" : { + "_dd.host.vcpu_count" : ${content_metrics__dd_host_vcpu_count_7}, + "_dd.profiling.enabled" : 0, + "_dd.trace_span_attribute_schema" : 0, + "process_id" : ${content_metrics_process_id}, + "test.source.end" : 18, + "test.source.start" : 12 + }, + "name" : "junit5.test", + "parent_id" : ${content_parent_id}, + "resource" : "org.example.TestFailedParameterized.test_failed_parameterized", + "service" : "worker.org.gradle.process.internal.worker.gradleworkermain", + "span_id" : ${content_span_id_4}, + "start" : ${content_start_7}, + "test_module_id" : ${content_test_module_id}, + "test_session_id" : ${content_test_session_id}, + "test_suite_id" : ${content_test_suite_id}, + "trace_id" : ${content_trace_id_4} + }, + "type" : "test", + "version" : 2 +}, { + "content" : { + "duration" : ${content_duration_8}, + "error" : 1, + "meta" : { + "_dd.profiling.ctx" : "test", + "_dd.tracer_host" : ${content_meta__dd_tracer_host}, + "component" : "junit5", + "dummy_ci_tag" : "dummy_ci_tag_value", + "env" : "none", + "error.message" : ${content_meta_error_message}, + "error.stack" : ${content_meta_error_stack_5}, + "error.type" : "org.opentest4j.AssertionFailedError", + "language" : "jvm", + "library_version" : ${content_meta_library_version}, + "runtime-id" : ${content_meta_runtime_id}, + "span.kind" : "test", + "test.codeowners" : "[\"owner1\",\"owner2\"]", + "test.framework" : "junit5", + "test.framework_version" : ${content_meta_test_framework_version}, + "test.has_failed_all_retries" : "true", + "test.is_retry" : "true", + "test.module" : "junit-5.3", + "test.name" : "test_failed_parameterized", + "test.parameters" : "{\"metadata\":{\"test_name\":\"[1] 0, 0, 42\"}}", + "test.retry_reason" : "auto_test_retry", + "test.source.file" : "dummy_source_path", + "test.source.method" : "test_failed_parameterized(III)V", + "test.status" : "fail", + "test.suite" : "org.example.TestFailedParameterized", + "test.type" : "test", + "test_session.name" : "session-name" + }, + "metrics" : { + "_dd.host.vcpu_count" : ${content_metrics__dd_host_vcpu_count_8}, + "_dd.profiling.enabled" : 0, + "_dd.trace_span_attribute_schema" : 0, + "process_id" : ${content_metrics_process_id}, + "test.source.end" : 18, + "test.source.start" : 12 + }, + "name" : "junit5.test", + "parent_id" : ${content_parent_id}, + "resource" : "org.example.TestFailedParameterized.test_failed_parameterized", + "service" : "worker.org.gradle.process.internal.worker.gradleworkermain", + "span_id" : ${content_span_id_5}, + "start" : ${content_start_8}, + "test_module_id" : ${content_test_module_id}, + "test_session_id" : ${content_test_session_id}, + "test_suite_id" : ${content_test_suite_id}, + "trace_id" : ${content_trace_id_5} + }, + "type" : "test", + "version" : 2 +}, { + "content" : { + "duration" : ${content_duration_9}, + "error" : 1, + "meta" : { + "_dd.profiling.ctx" : "test", + "_dd.tracer_host" : ${content_meta__dd_tracer_host}, + "component" : "junit5", + "dummy_ci_tag" : "dummy_ci_tag_value", + "env" : "none", + "error.message" : ${content_meta_error_message_2}, + "error.stack" : ${content_meta_error_stack_6}, + "error.type" : "org.opentest4j.AssertionFailedError", + "language" : "jvm", + "library_version" : ${content_meta_library_version}, + "runtime-id" : ${content_meta_runtime_id}, + "span.kind" : "test", + "test.codeowners" : "[\"owner1\",\"owner2\"]", + "test.failure_suppressed" : "true", + "test.framework" : "junit5", + "test.framework_version" : ${content_meta_test_framework_version}, + "test.module" : "junit-5.3", + "test.name" : "test_failed_parameterized", + "test.parameters" : "{\"metadata\":{\"test_name\":\"[2] 1, 1, 42\"}}", + "test.source.file" : "dummy_source_path", + "test.source.method" : "test_failed_parameterized(III)V", + "test.status" : "fail", + "test.suite" : "org.example.TestFailedParameterized", + "test.type" : "test", + "test_session.name" : "session-name" + }, + "metrics" : { + "_dd.host.vcpu_count" : ${content_metrics__dd_host_vcpu_count_9}, + "_dd.profiling.enabled" : 0, + "_dd.trace_span_attribute_schema" : 0, + "process_id" : ${content_metrics_process_id}, + "test.source.end" : 18, + "test.source.start" : 12 + }, + "name" : "junit5.test", + "parent_id" : ${content_parent_id}, + "resource" : "org.example.TestFailedParameterized.test_failed_parameterized", + "service" : "worker.org.gradle.process.internal.worker.gradleworkermain", + "span_id" : ${content_span_id_6}, + "start" : ${content_start_9}, + "test_module_id" : ${content_test_module_id}, + "test_session_id" : ${content_test_session_id}, + "test_suite_id" : ${content_test_suite_id}, + "trace_id" : ${content_trace_id_6} + }, + "type" : "test", + "version" : 2 +}, { + "content" : { + "duration" : ${content_duration_10}, + "error" : 1, + "meta" : { + "_dd.profiling.ctx" : "test", + "_dd.tracer_host" : ${content_meta__dd_tracer_host}, + "component" : "junit5", + "dummy_ci_tag" : "dummy_ci_tag_value", + "env" : "none", + "error.message" : ${content_meta_error_message_2}, + "error.stack" : ${content_meta_error_stack_7}, + "error.type" : "org.opentest4j.AssertionFailedError", + "language" : "jvm", + "library_version" : ${content_meta_library_version}, + "runtime-id" : ${content_meta_runtime_id}, + "span.kind" : "test", + "test.codeowners" : "[\"owner1\",\"owner2\"]", + "test.failure_suppressed" : "true", + "test.framework" : "junit5", + "test.framework_version" : ${content_meta_test_framework_version}, + "test.is_retry" : "true", + "test.module" : "junit-5.3", + "test.name" : "test_failed_parameterized", + "test.parameters" : "{\"metadata\":{\"test_name\":\"[2] 1, 1, 42\"}}", + "test.retry_reason" : "auto_test_retry", + "test.source.file" : "dummy_source_path", + "test.source.method" : "test_failed_parameterized(III)V", + "test.status" : "fail", + "test.suite" : "org.example.TestFailedParameterized", + "test.type" : "test", + "test_session.name" : "session-name" + }, + "metrics" : { + "_dd.host.vcpu_count" : ${content_metrics__dd_host_vcpu_count_10}, + "_dd.profiling.enabled" : 0, + "_dd.trace_span_attribute_schema" : 0, + "process_id" : ${content_metrics_process_id}, + "test.source.end" : 18, + "test.source.start" : 12 + }, + "name" : "junit5.test", + "parent_id" : ${content_parent_id}, + "resource" : "org.example.TestFailedParameterized.test_failed_parameterized", + "service" : "worker.org.gradle.process.internal.worker.gradleworkermain", + "span_id" : ${content_span_id_7}, + "start" : ${content_start_10}, + "test_module_id" : ${content_test_module_id}, + "test_session_id" : ${content_test_session_id}, + "test_suite_id" : ${content_test_suite_id}, + "trace_id" : ${content_trace_id_7} + }, + "type" : "test", + "version" : 2 +}, { + "content" : { + "duration" : ${content_duration_11}, + "error" : 1, + "meta" : { + "_dd.profiling.ctx" : "test", + "_dd.tracer_host" : ${content_meta__dd_tracer_host}, + "component" : "junit5", + "dummy_ci_tag" : "dummy_ci_tag_value", + "env" : "none", + "error.message" : ${content_meta_error_message_2}, + "error.stack" : ${content_meta_error_stack_8}, + "error.type" : "org.opentest4j.AssertionFailedError", + "language" : "jvm", + "library_version" : ${content_meta_library_version}, + "runtime-id" : ${content_meta_runtime_id}, + "span.kind" : "test", + "test.codeowners" : "[\"owner1\",\"owner2\"]", + "test.failure_suppressed" : "true", + "test.framework" : "junit5", + "test.framework_version" : ${content_meta_test_framework_version}, + "test.is_retry" : "true", + "test.module" : "junit-5.3", + "test.name" : "test_failed_parameterized", + "test.parameters" : "{\"metadata\":{\"test_name\":\"[2] 1, 1, 42\"}}", + "test.retry_reason" : "auto_test_retry", + "test.source.file" : "dummy_source_path", + "test.source.method" : "test_failed_parameterized(III)V", + "test.status" : "fail", + "test.suite" : "org.example.TestFailedParameterized", + "test.type" : "test", + "test_session.name" : "session-name" + }, + "metrics" : { + "_dd.host.vcpu_count" : ${content_metrics__dd_host_vcpu_count_11}, + "_dd.profiling.enabled" : 0, + "_dd.trace_span_attribute_schema" : 0, + "process_id" : ${content_metrics_process_id}, + "test.source.end" : 18, + "test.source.start" : 12 + }, + "name" : "junit5.test", + "parent_id" : ${content_parent_id}, + "resource" : "org.example.TestFailedParameterized.test_failed_parameterized", + "service" : "worker.org.gradle.process.internal.worker.gradleworkermain", + "span_id" : ${content_span_id_8}, + "start" : ${content_start_11}, + "test_module_id" : ${content_test_module_id}, + "test_session_id" : ${content_test_session_id}, + "test_suite_id" : ${content_test_suite_id}, + "trace_id" : ${content_trace_id_8} + }, + "type" : "test", + "version" : 2 +}, { + "content" : { + "duration" : ${content_duration_12}, + "error" : 1, + "meta" : { + "_dd.profiling.ctx" : "test", + "_dd.tracer_host" : ${content_meta__dd_tracer_host}, + "component" : "junit5", + "dummy_ci_tag" : "dummy_ci_tag_value", + "env" : "none", + "error.message" : ${content_meta_error_message_2}, + "error.stack" : ${content_meta_error_stack_9}, + "error.type" : "org.opentest4j.AssertionFailedError", + "language" : "jvm", + "library_version" : ${content_meta_library_version}, + "runtime-id" : ${content_meta_runtime_id}, + "span.kind" : "test", + "test.codeowners" : "[\"owner1\",\"owner2\"]", + "test.failure_suppressed" : "true", + "test.framework" : "junit5", + "test.framework_version" : ${content_meta_test_framework_version}, + "test.is_retry" : "true", + "test.module" : "junit-5.3", + "test.name" : "test_failed_parameterized", + "test.parameters" : "{\"metadata\":{\"test_name\":\"[2] 1, 1, 42\"}}", + "test.retry_reason" : "auto_test_retry", + "test.source.file" : "dummy_source_path", + "test.source.method" : "test_failed_parameterized(III)V", + "test.status" : "fail", + "test.suite" : "org.example.TestFailedParameterized", + "test.type" : "test", + "test_session.name" : "session-name" + }, + "metrics" : { + "_dd.host.vcpu_count" : ${content_metrics__dd_host_vcpu_count_12}, + "_dd.profiling.enabled" : 0, + "_dd.trace_span_attribute_schema" : 0, + "process_id" : ${content_metrics_process_id}, + "test.source.end" : 18, + "test.source.start" : 12 + }, + "name" : "junit5.test", + "parent_id" : ${content_parent_id}, + "resource" : "org.example.TestFailedParameterized.test_failed_parameterized", + "service" : "worker.org.gradle.process.internal.worker.gradleworkermain", + "span_id" : ${content_span_id_9}, + "start" : ${content_start_12}, + "test_module_id" : ${content_test_module_id}, + "test_session_id" : ${content_test_session_id}, + "test_suite_id" : ${content_test_suite_id}, + "trace_id" : ${content_trace_id_9} + }, + "type" : "test", + "version" : 2 +}, { + "content" : { + "duration" : ${content_duration_13}, + "error" : 1, + "meta" : { + "_dd.profiling.ctx" : "test", + "_dd.tracer_host" : ${content_meta__dd_tracer_host}, + "component" : "junit5", + "dummy_ci_tag" : "dummy_ci_tag_value", + "env" : "none", + "error.message" : ${content_meta_error_message_2}, + "error.stack" : ${content_meta_error_stack_10}, + "error.type" : "org.opentest4j.AssertionFailedError", + "language" : "jvm", + "library_version" : ${content_meta_library_version}, + "runtime-id" : ${content_meta_runtime_id}, + "span.kind" : "test", + "test.codeowners" : "[\"owner1\",\"owner2\"]", + "test.framework" : "junit5", + "test.framework_version" : ${content_meta_test_framework_version}, + "test.has_failed_all_retries" : "true", + "test.is_retry" : "true", + "test.module" : "junit-5.3", + "test.name" : "test_failed_parameterized", + "test.parameters" : "{\"metadata\":{\"test_name\":\"[2] 1, 1, 42\"}}", + "test.retry_reason" : "auto_test_retry", + "test.source.file" : "dummy_source_path", + "test.source.method" : "test_failed_parameterized(III)V", + "test.status" : "fail", + "test.suite" : "org.example.TestFailedParameterized", + "test.type" : "test", + "test_session.name" : "session-name" + }, + "metrics" : { + "_dd.host.vcpu_count" : ${content_metrics__dd_host_vcpu_count_13}, + "_dd.profiling.enabled" : 0, + "_dd.trace_span_attribute_schema" : 0, + "process_id" : ${content_metrics_process_id}, + "test.source.end" : 18, + "test.source.start" : 12 + }, + "name" : "junit5.test", + "parent_id" : ${content_parent_id}, + "resource" : "org.example.TestFailedParameterized.test_failed_parameterized", + "service" : "worker.org.gradle.process.internal.worker.gradleworkermain", + "span_id" : ${content_span_id_10}, + "start" : ${content_start_13}, + "test_module_id" : ${content_test_module_id}, + "test_session_id" : ${content_test_session_id}, + "test_suite_id" : ${content_test_suite_id}, + "trace_id" : ${content_trace_id_10} + }, + "type" : "test", + "version" : 2 +} ] \ No newline at end of file