-
Notifications
You must be signed in to change notification settings - Fork 311
Closed
Labels
comp: ci visibilityContinuous Integration VisibilityContinuous Integration Visibilitytype: bugBug report and fixBug report and fix
Description
Tracer Version(s)
1.47.3~4a85e1fff5
Java Version(s)
21.0.2
JVM Vendor
Eclipse Adoptium / Temurin
Bug Report
When sbt is configured to run tests in fork mode, neither munit nor junit tests are reported to datadog.
Forking mode works for scalatest.
Expected Behavior
munit with Test/fork := true
reports tests to datadog.
Reproduction Code
build.sbt
scalaVersion := "3.3.5"
Test / fork := true // comment it out to make this work
libraryDependencies ++= Seq(
"junit" % "junit" % "4.13.2" % Test,
"com.github.sbt" % "junit-interface" % "0.13.3" % Test,
"org.scalameta" %% "munit" % "1.1.0" % Test,
)
src/test/scala/ExampleTest.scala
class ExampleJunitTest {
@org.junit.Test
def hello(): Unit = {
println("Hello from JUnit")
}
}
class ExampleMunitTest extends munit.FunSuite {
test("hello") {
println("Hello from MUnit")
}
}
project/build.properties
sbt.version=1.10.11
Simplified snippet from .github/workflows/test.yaml
jobs:
tests:
steps:
- uses: sbt/setup-sbt@v1
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
- uses: datadog/test-visibility-github-action@v2
with:
languages: java
api_key: ${{ secrets.DATADOG_API_KEY }}
service: foo
- run: sbt test
Metadata
Metadata
Assignees
Labels
comp: ci visibilityContinuous Integration VisibilityContinuous Integration Visibilitytype: bugBug report and fixBug report and fix