Replies: 2 comments 9 replies
-
Have you verified that the test jar is on your class path with the expected class path root? |
Beta Was this translation helpful? Give feedback.
2 replies
-
I am not sure my problem is related to this or not, but I am trying to run junit tests from command line. The tests run fine within IDE, I am using eclipse. So I have a shell script file:
iwsut.jar contains the com.tests.Tester and the junit tests. The Tester has the following:
Only thing that is output is:
What am I doing wrong? |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
Full disclosure, I am not much of a java developer so a lot of the concepts around JARs and classpaths have a cursory knowledge of.
We've been trying to update our test infrastructure to be more programmatic as well as handle a level of test sharding for integration tests that isn't default out-of-the-box with gradle Junit 5. Our goal is to be able to write a custom
LauncherDiscoveryRequest
to generate aTestPlan
by pointing to some pre-compiled tests/JARs and then do some filtering + ordering based on that. However, we are never able to get any tests found./Users/jramsley/stage/test/libs/tests.jar
javap -v -classpath tests.jar <class>
I can see that the@Test
annotation is on the classwith output
I would expect this to scan the compiled test classes, find the annotations and add them as children to the root/containers. At minimum I would expect
testPlan_.containsTests()
to be returningtrue
.So at this point I am sort of at a loss how to get the selector for
LauncherDiscoveryRequest
to be able to scan and find these annotations. I've tried following Discovering Tests but unable to get the launcher to find any tests. Can anyone help point me in the right direction to debug this?Beta Was this translation helpful? Give feedback.
All reactions