Skip to content

Commit

Permalink
Update test fixtures
Browse files Browse the repository at this point in the history
  • Loading branch information
nikita-tkachenko-datadog committed Feb 3, 2025
1 parent f5c4b8f commit c80ed84
Show file tree
Hide file tree
Showing 89 changed files with 1,326 additions and 78 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,13 @@ class CucumberTest extends CiVisibilityInstrumentationTest {
assertSpansData(testcaseName)

where:
testcaseName | features | quarantined | known
"test-quarantined-failed" | ["org/example/cucumber/calculator/basic_arithmetic_failed.feature"] | [
testcaseName | features | quarantined | known
"test-quarantined-failed-known" | ["org/example/cucumber/calculator/basic_arithmetic_failed.feature"] | [
new TestIdentifier("classpath:org/example/cucumber/calculator/basic_arithmetic_failed.feature:Basic Arithmetic", "Addition", null)
] | [
new TestIdentifier("classpath:org/example/cucumber/calculator/basic_arithmetic_failed.feature:Basic Arithmetic", "Addition", null)
]
"test-quarantined-failed-efd" | ["org/example/cucumber/calculator/basic_arithmetic_failed.feature"] | [
"test-quarantined-failed-efd" | ["org/example/cucumber/calculator/basic_arithmetic_failed.feature"] | [
new TestIdentifier("classpath:org/example/cucumber/calculator/basic_arithmetic_failed.feature:Basic Arithmetic", "Addition", null)
] | []
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@
"span.kind" : "test",
"test.framework" : "cucumber",
"test.framework_version" : ${content_meta_test_framework_version},
"test.has_failed_all_retries" : "true",
"test.is_retry" : "true",
"test.management.is_quarantined" : "true",
"test.module" : "cucumber-junit-4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@
"span.kind" : "test",
"test.framework" : "cucumber",
"test.framework_version" : ${content_meta_test_framework_version},
"test.has_failed_all_retries" : "true",
"test.is_new" : "true",
"test.is_retry" : "true",
"test.management.is_quarantined" : "true",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[ {
"files" : [ {
"filename" : "org/example/cucumber/calculator/basic_arithmetic_failed.feature"
} ],
"span_id" : ${content_span_id},
"test_session_id" : ${content_test_session_id},
"test_suite_id" : ${content_test_suite_id}
} ]
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
[ {
"content" : {
"duration" : ${content_duration},
"error" : 0,
"meta" : {
"_dd.p.tid" : ${content_meta__dd_p_tid},
"component" : "junit",
"dummy_ci_tag" : "dummy_ci_tag_value",
"env" : "none",
"library_version" : ${content_meta_library_version},
"span.kind" : "test_suite_end",
"test.framework" : "cucumber",
"test.framework_version" : ${content_meta_test_framework_version},
"test.module" : "cucumber-junit-4",
"test.status" : "fail",
"test.suite" : "classpath:org/example/cucumber/calculator/basic_arithmetic_failed.feature:Basic Arithmetic",
"test.type" : "test",
"test_session.name" : "session-name"
},
"metrics" : {
"_dd.host.vcpu_count" : ${content_metrics__dd_host_vcpu_count}
},
"name" : "junit.test_suite",
"resource" : "classpath:org/example/cucumber/calculator/basic_arithmetic_failed.feature:Basic Arithmetic",
"service" : "worker.org.gradle.process.internal.worker.gradleworkermain",
"start" : ${content_start},
"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_2},
"error" : 1,
"meta" : {
"_dd.profiling.ctx" : "test",
"_dd.tracer_host" : ${content_meta__dd_tracer_host},
"component" : "junit",
"dummy_ci_tag" : "dummy_ci_tag_value",
"env" : "none",
"error.message" : ${content_meta_error_message},
"error.stack" : ${content_meta_error_stack},
"error.type" : "java.lang.AssertionError",
"language" : "jvm",
"library_version" : ${content_meta_library_version},
"runtime-id" : ${content_meta_runtime_id},
"span.kind" : "test",
"test.framework" : "cucumber",
"test.framework_version" : ${content_meta_test_framework_version},
"test.management.is_quarantined" : "true",
"test.module" : "cucumber-junit-4",
"test.name" : "Addition",
"test.status" : "fail",
"test.suite" : "classpath:org/example/cucumber/calculator/basic_arithmetic_failed.feature:Basic Arithmetic",
"test.traits" : "{\"category\":[\"foo\"]}",
"test.type" : "test",
"test_session.name" : "session-name"
},
"metrics" : {
"_dd.host.vcpu_count" : ${content_metrics__dd_host_vcpu_count_2},
"_dd.profiling.enabled" : 0,
"_dd.trace_span_attribute_schema" : 0,
"process_id" : ${content_metrics_process_id}
},
"name" : "junit.test",
"parent_id" : ${content_parent_id},
"resource" : "classpath:org/example/cucumber/calculator/basic_arithmetic_failed.feature:Basic Arithmetic.Addition",
"service" : "worker.org.gradle.process.internal.worker.gradleworkermain",
"span_id" : ${content_span_id},
"start" : ${content_start_2},
"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_3},
"error" : 0,
"meta" : {
"_dd.p.tid" : ${content_meta__dd_p_tid_2},
"_dd.profiling.ctx" : "test",
"_dd.tracer_host" : ${content_meta__dd_tracer_host},
"component" : "junit",
"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" : "cucumber-junit-4",
"test.early_flake.enabled" : "true",
"test.framework" : "cucumber",
"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_3},
"_dd.profiling.enabled" : 0,
"_dd.trace_span_attribute_schema" : 0,
"process_id" : ${content_metrics_process_id}
},
"name" : "junit.test_session",
"resource" : "cucumber-junit-4",
"service" : "worker.org.gradle.process.internal.worker.gradleworkermain",
"start" : ${content_start_3},
"test_session_id" : ${content_test_session_id}
},
"type" : "test_session_end",
"version" : 1
}, {
"content" : {
"duration" : ${content_duration_4},
"error" : 0,
"meta" : {
"_dd.p.tid" : ${content_meta__dd_p_tid_3},
"component" : "junit",
"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" : "cucumber",
"test.framework_version" : ${content_meta_test_framework_version},
"test.module" : "cucumber-junit-4",
"test.status" : "fail",
"test.type" : "test",
"test_session.name" : "session-name"
},
"metrics" : {
"_dd.host.vcpu_count" : ${content_metrics__dd_host_vcpu_count_4}
},
"name" : "junit.test_module",
"resource" : "cucumber-junit-4",
"service" : "worker.org.gradle.process.internal.worker.gradleworkermain",
"start" : ${content_start_4},
"test_module_id" : ${content_test_module_id},
"test_session_id" : ${content_test_session_id}
},
"type" : "test_module_end",
"version" : 1
} ]
Original file line number Diff line number Diff line change
Expand Up @@ -143,4 +143,4 @@
},
"type" : "test_module_end",
"version" : 1
} ]
} ]
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@
"span.kind" : "test",
"test.framework" : "cucumber",
"test.framework_version" : ${content_meta_test_framework_version},
"test.has_failed_all_retries" : "true",
"test.is_retry" : "true",
"test.module" : "cucumber-junit-4",
"test.name" : "Addition",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,7 @@
"span.kind" : "test",
"test.framework" : "cucumber",
"test.framework_version" : ${content_meta_test_framework_version},
"test.has_failed_all_retries" : "true",
"test.is_retry" : "true",
"test.module" : "cucumber-junit-4",
"test.name" : "Many additions",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,9 @@ class MUnitTest extends CiVisibilityInstrumentationTest {
assertSpansData(testcaseName)

where:
testcaseName | tests | quarantined | known
"test-quarantined-failed" | [TestFailedMUnit] | [new TestIdentifier("org.example.TestFailedMUnit", "Calculator.add", null)] | [new TestIdentifier("org.example.TestFailedMUnit", "Calculator.add", null)]
"test-quarantined-failed-efd" | [TestFailedMUnit] | [new TestIdentifier("org.example.TestFailedMUnit", "Calculator.add", null)] | []
testcaseName | tests | quarantined | known
"test-quarantined-failed-known" | [TestFailedMUnit] | [new TestIdentifier("org.example.TestFailedMUnit", "Calculator.add", null)] | [new TestIdentifier("org.example.TestFailedMUnit", "Calculator.add", null)]
"test-quarantined-failed-efd" | [TestFailedMUnit] | [new TestIdentifier("org.example.TestFailedMUnit", "Calculator.add", null)] | []
}

private void runTests(Collection<Class<?>> tests, boolean expectSuccess = true) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,7 @@
"test.codeowners" : "[\"owner1\",\"owner2\"]",
"test.framework" : "munit",
"test.framework_version" : ${content_meta_test_framework_version},
"test.has_failed_all_retries" : "true",
"test.is_retry" : "true",
"test.management.is_quarantined" : "true",
"test.module" : "munit-junit-4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@
"test.codeowners" : "[\"owner1\",\"owner2\"]",
"test.framework" : "munit",
"test.framework_version" : ${content_meta_test_framework_version},
"test.has_failed_all_retries" : "true",
"test.is_new" : "true",
"test.is_retry" : "true",
"test.management.is_quarantined" : "true",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[ ]
Loading

0 comments on commit c80ed84

Please sign in to comment.