Skip to content
Discussion options

You must be logged in to vote

Then attempt to discover the test inside the compiled class file:

java -jar junit-platform-console-standalone-6.1.0.jar discover --select-file TestClass.class

The --select-file option is a request from the platform to a test engine to discover tests in the selected file, but only if it is able too. The Jupiter, Vintage and Suite engines, included in the standalone artifact, can only discover tests on the classpath. So you'd have to use --select-class instead.

Which leads to the second item, the compiled test class is not included in the classpath. You'd add it the usual way using java --class-path ... or by using the --class-path option from the console launcher.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@onnimikki
Comment options

@mpkorstanje
Comment options

Answer selected by mpkorstanje
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants