Skip to content

Enable build tools to relocate "target/test-reports-zio/output.json". #10054

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 28, 2025

Conversation

dubinsky
Copy link
Contributor

@dubinsky dubinsky commented Jul 25, 2025

Currently, ZIO Test writes test report into "target/test-reports-zio/output.json"; this location is appropriate when running with sbt - and completely out of place for other build tools (e.g. Gradle).

This pull request introduces a test argument -reports (zio.test.TestArgs.reportsParent) that specifies parent directory of test-reports-zio/output.json, enabling build tools running ZIO Test via its sbt.testing.Framework implementation to place test report in an appropriate location.

fixes #10037

Currently, output.json is written when running on JVM and Scala Native - but not on Scala.js; this pull request does not change that.

Currently, "target/test-reports-zio" directory is also hard-coded as a directory where test debug files **_debug.txt are written to (in zio.test.TestDebug); this pull request does not change that either.

@dubinsky dubinsky force-pushed the relocate-output-json branch 4 times, most recently from 0043cef to d59f9ac Compare July 25, 2025 19:40
Currently, ZIO Test writes test report into "target/test-reports-zio/output.json"; this location is appropriate when running with sbt - and completely out of place for other build tools (e.g. Gradle).

This pull request introduces a test argument `-reports` (`zio.test.TestArgs.reportsParent`) that specifies parent directory of `test-reports-zio/output.json`, enabling build tools running ZIO Test via its `sbt.testing.Framework` implementation to place test report in an appropriate location.

fixes zio#10037

Currently, `output.json` is written when running on JVM and Scala Native - but not on Scala.js; this pull request does not change that.

Currently, "target/test-reports-zio" directory is also hard-coded as a directory where test debug files `**_debug.txt` are written to (in `zio.test.TestDebug`); this pull request does not change that either.
Copy link
Contributor

@kyri-petrou kyri-petrou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@kyri-petrou kyri-petrou merged commit 3c5fe03 into zio:series/2.x Jul 28, 2025
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[zio-test] Relocate/suppress output.json.
2 participants