Skip to content

Add java-test-runner module to support running tests with pure Java#4197

Open
Gedochao wants to merge 4 commits intoVirtusLab:mainfrom
Gedochao:feature/pure-java-test-runner
Open

Add java-test-runner module to support running tests with pure Java#4197
Gedochao wants to merge 4 commits intoVirtusLab:mainfrom
Gedochao:feature/pure-java-test-runner

Conversation

@Gedochao
Copy link
Copy Markdown
Contributor

@Gedochao Gedochao commented Mar 23, 2026

Fixes #3010

This essentially adds a new (pure Java) java-test-runner module to Scala CLI, which is essentially a Java rewrite of the existing test-runner.
This in turn enables to not add Scala to test builds for Java projects.
I also added some extra logging to the old test-runner to get it on par with the new java-test-runner.

Checklist

  • tested the solution locally and it works
  • ran the code formatter (scala-cli fmt .)
  • ran scalafix (./mill -i __.fix)
  • ran reference docs auto-generation (./mill -i 'generate-reference-doc[]'.run)

How much have your relied on LLM-based tools in this contribution?

extensively, Cursor + Claude

How was the solution tested?

  • unit tests for the new java-test-runner module included
  • integration tests for running tests with pure Java included

@Gedochao Gedochao force-pushed the feature/pure-java-test-runner branch 2 times, most recently from dcebf1c to ea12ffb Compare March 24, 2026 14:47
@Gedochao Gedochao force-pushed the feature/pure-java-test-runner branch from ea12ffb to 67cc76d Compare March 24, 2026 14:50
@Gedochao Gedochao marked this pull request as ready for review March 29, 2026 11:02
@Gedochao Gedochao requested review from tgodzik and zielinsky March 29, 2026 11:02
Copy link
Copy Markdown
Member

@tgodzik tgodzik left a comment

Choose a reason for hiding this comment

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

LGTM, just one questions otherwise


public static List<String> commonTestFrameworks() {
return Arrays.asList(
"munit.Framework",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can we actually run these test from Java runner? Don't we only want junit?

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.

Add a pure Java test runner

2 participants