Skip to content

Commit 784c387

Browse files
Update Test Visibility and ITR docs for Java: add Scalatest support, and other minor updates (DataDog#21100)
* Update Test Visibility and ITR docs for Java: add Scalatest support, and other minor updates * Apply code review suggestion Co-authored-by: Brett Blue <84536271+brett0000FF@users.noreply.github.com> * Bump ITR tracer version --------- Co-authored-by: Brett Blue <84536271+brett0000FF@users.noreply.github.com>
1 parent 8b08bfc commit 784c387

File tree

3 files changed

+29
-5
lines changed

3 files changed

+29
-5
lines changed

content/en/continuous_integration/pipelines/jenkins.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -543,6 +543,8 @@ See the [Test Visibility documentation][17] for your language to make sure that
543543

544544
### Enable with the Jenkins configuration UI
545545

546+
UI-based Test Visibility configuration is available in Datadog Jenkins plugin v5.6.0 or newer.
547+
546548
1. In your Jenkins instance web interface, go to the job or pipeline that you want to instrument and choose the **Configure** option.
547549
2. In the **General** configuration section, tick the **Enable Datadog Test Visibility** checkbox.
548550
3. Enter the name of the service or library being tested into the **Service Name** input. You can choose any value that makes sense to you.

content/en/intelligent_test_runner/setup/java.md

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ code_lang_weight: 10
88
aliases:
99
- continuous_integration/intelligent_test_runner/java/
1010
- continuous_integration/intelligent_test_runner/setup/java/
11-
11+
1212
further_reading:
1313
- link: "/continuous_integration/tests"
1414
tag: "Documentation"
@@ -22,13 +22,14 @@ further_reading:
2222

2323
## Compatibility
2424

25-
Intelligent Test Runner is supported in `dd-java-agent >= 1.22.0`.
25+
Intelligent Test Runner is supported in `dd-java-agent >= 1.26.1`.
2626

2727
The following test frameworks are supported:
2828
- JUnit >= 4.10 and >= 5.3
2929
- TestNG >= 6.4
3030
- Spock >= 2.0
3131
- Cucumber >= 5.4.0
32+
- Scalatest >= 3.0.8
3233

3334
## Setup
3435

@@ -89,6 +90,7 @@ Unskippable tests are supported in the following versions and testing frameworks
8990
- TestNG >= 6.4
9091
- Spock >= 2.2
9192
- Cucumber >= 5.4.0
93+
- Scalatest >= 3.0.8
9294

9395
### Marking tests as unskippable
9496

@@ -288,6 +290,24 @@ Feature: My Feature
288290
# ...
289291
```
290292

293+
{{% /tab %}}
294+
{{% tab "ScalaTest" %}}
295+
296+
Create a `Tag` with the value `datadog_itr_unskippable` and tag your test case with it:
297+
298+
```scala
299+
import org.scalatest.Tag
300+
import org.scalatest.flatspec.AnyFlatSpec
301+
302+
object ItrUnskippableTag extends Tag("datadog_itr_unskippable")
303+
304+
class MyTestSuite extends AnyFlatSpec {
305+
"myTest" should "assert something" taggedAs ItrUnskippableTag in {
306+
// ...
307+
}
308+
}
309+
```
310+
291311
{{% /tab %}}
292312
{{< /tabs >}}
293313

content/en/tests/setup/java.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ Supported test frameworks:
4040
| Spock | >= 2.0 |
4141
| Cucumber | >= 5.4.0 |
4242
| Karate | >= 1.0.0 |
43+
| Scalatest | >= 3.0.8 |
4344
| Scala MUnit | >= 0.7.28 |
4445

4546
If your test framework is not supported, you can try instrumenting your tests using [Manual Testing API][1].
@@ -358,7 +359,7 @@ Ensure that you are using the latest version of the tracer.
358359

359360
Verify that your build system and testing framework are supported by CI Visibility. See the list of [supported build systems and test frameworks](#compatibility).
360361

361-
Ensure that the `dd.civisibility.enabled` property is set to `true` in the tracer arguments.
362+
Ensure that the `dd.civisibility.enabled` property (or `DD_CIVISIBILITY_ENABLED` environment variable) is set to `true` in the tracer arguments.
362363

363364
Check the build output for any errors that indicate tracer misconfiguration, such as an unset `DD_API_KEY` environment variable.
364365

@@ -370,7 +371,8 @@ The plugin is optional, as it only serves to reduce the performance overhead.
370371

371372
Depending on the build configuration, adding the plugin can sometimes disrupt the compilation process.
372373

373-
If the plugin interferes with the build, disable it by adding `dd.civisibility.compiler.plugin.auto.configuration.enabled=false` to the list of `-javaagent` arguments.
374+
If the plugin interferes with the build, disable it by adding `dd.civisibility.compiler.plugin.auto.configuration.enabled=false` to the list of `-javaagent` arguments
375+
(or by setting `DD_CIVISIBILITY_COMPILER_PLUGIN_AUTO_CONFIGURATION_ENABLED=false` environment variable).
374376

375377
### Tests fail when building a project with the tracer attached
376378

@@ -384,7 +386,7 @@ They are enabled by default.
384386
To disable a specific integration, refer to the [Datadog Tracer Compatibility][7] table for the relevant configuration property names.
385387
For example, to disable `OkHttp3` client request integration, add `dd.integration.okhttp-3.enabled=false` to the list of `-javaagent` arguments.
386388

387-
To disable all integrations, augment the list of `-javaagent` arguments with `dd.trace.enabled=false`.
389+
To disable all integrations, augment the list of `-javaagent` arguments with `dd.trace.enabled=false` (or set `DD_TRACE_ENABLED=false` environment variable).
388390

389391
## Further reading
390392

0 commit comments

Comments
 (0)