title: unable to run junit5 tests from terminal using Junit5 Console Launcher
body: <p>I'm performing unit tests for my spring boot application. The tests work fine and give the expected output while running from intellij. I'm trying to run the same tests from terminal using Junit5 Console Launcher. 
  This is the command I've used :-</p>
  
  <pre><code>java -jar junit-platform-console-standalone-1.6.0-RC1.jar --class-path . -c AdapterTest
  </code></pre>
  
  <p>I'm running the above command from <code>out/tests/package that contains the test class</code> folder. </p>
  
  <p>I can see the required jars and dependencies in my external jars folder. But I'm getting the below error when I run it from terminal. </p>
  
  <p>Entire stack trace :-</p>
  
  <pre><code>java -jar junit-platform-console-standalone-1.6.0-RC1.jar --class-path . -c AdapterTest
  Thanks for using JUnit! Support its development at https://junit.org/sponsoring
  org.junit.platform.commons.JUnitException: TestEngine with ID 'junit-jupiter' failed to discover tests
          at org.junit.platform.launcher.core.DefaultLauncher.discoverEngineRoot(DefaultLauncher.java:189)
          at org.junit.platform.launcher.core.DefaultLauncher.discoverRoot(DefaultLauncher.java:168)
          at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:132)
          at org.junit.platform.console.tasks.ConsoleTestExecutor.executeTests(ConsoleTestExecutor.java:66)
          at org.junit.platform.console.tasks.ConsoleTestExecutor.lambda$execute$0(ConsoleTestExecutor.java:58)
          at org.junit.platform.console.tasks.CustomContextClassLoaderExecutor.replaceThreadContextClassLoaderAndInvoke(CustomContextClassLoaderExecutor.java:41)
          at org.junit.platform.console.tasks.CustomContextClassLoaderExecutor.invoke(CustomContextClassLoaderExecutor.java:31)
          at org.junit.platform.console.tasks.ConsoleTestExecutor.execute(ConsoleTestExecutor.java:58)
          at org.junit.platform.console.ConsoleLauncher.executeTests(ConsoleLauncher.java:95)
          at org.junit.platform.console.ConsoleLauncher.execute(ConsoleLauncher.java:73)
          at org.junit.platform.console.ConsoleLauncher.execute(ConsoleLauncher.java:50)
          at org.junit.platform.console.ConsoleLauncher.execute(ConsoleLauncher.java:43)
          at org.junit.platform.console.ConsoleLauncher.main(ConsoleLauncher.java:37)
  Caused by: org.junit.platform.commons.JUnitException: ClassSelector [className = 'AdapterTest'] resolution failed
          at org.junit.platform.launcher.listeners.discovery.AbortOnFailureLauncherDiscoveryListener.selectorProcessed(AbortOnFailureLauncherDiscoveryListener.java:39)
          at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.resolveCompletely(EngineDiscoveryRequestResolution.java:102)
          at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.run(EngineDiscoveryRequestResolution.java:82)
          at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolver.resolve(EngineDiscoveryRequestResolver.java:113)
          at org.junit.jupiter.engine.discovery.DiscoverySelectorResolver.resolveSelectors(DiscoverySelectorResolver.java:45)
          at org.junit.jupiter.engine.JupiterTestEngine.discover(JupiterTestEngine.java:69)
          at org.junit.platform.launcher.core.DefaultLauncher.discoverEngineRoot(DefaultLauncher.java:181)
          ... 12 more
  Caused by: org.junit.platform.commons.PreconditionViolationException: Could not load class with name: AdapterTest
          at org.junit.platform.engine.discovery.ClassSelector.lambda$getJavaClass$0(ClassSelector.java:75)
          at org.junit.platform.commons.function.Try$Failure.getOrThrow(Try.java:335)
          at org.junit.platform.engine.discovery.ClassSelector.getJavaClass(ClassSelector.java:74)
          at org.junit.jupiter.engine.discovery.ClassSelectorResolver.resolve(ClassSelectorResolver.java:66)
          at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.lambda$resolve$2(EngineDiscoveryRequestResolution.java:134)
          at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
          at java.util.ArrayList$ArrayListSpliterator.tryAdvance(ArrayList.java:1359)
          at java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:126)
          at java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:499)
          at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:486)
          at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
          at java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:152)
          at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
          at java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:531)
          at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.resolve(EngineDiscoveryRequestResolution.java:185)
          at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.resolve(EngineDiscoveryRequestResolution.java:125)
          at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.resolveCompletely(EngineDiscoveryRequestResolution.java:91)
          ... 17 more
  Caused by: java.lang.ClassNotFoundException: AdapterTest
          at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
          at java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:817)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
          at org.junit.platform.commons.util.ReflectionUtils.lambda$tryToLoadClass$9(ReflectionUtils.java:790)
          at org.junit.platform.commons.function.Try.lambda$call$0(Try.java:57)
          at org.junit.platform.commons.function.Try.of(Try.java:93)
          at org.junit.platform.commons.function.Try.call(Try.java:57)
          at org.junit.platform.commons.util.ReflectionUtils.tryToLoadClass(ReflectionUtils.java:753)
          at org.junit.platform.commons.util.ReflectionUtils.tryToLoadClass(ReflectionUtils.java:709)
          ... 32 more
  </code></pre>
  
  <p>I'm not sure why I'm getting this error. Tried everything mentioned here :- <code>https://stackoverflow.com/questions/45869932/unable-to-run-tests-with-junit5-console-launcher</code> but I'm still getting the above mentioned error. How do I run the tests from terminal?</p>
  
  <p>Update :-
  Tried running the command from out/tests  :-
  Getting the following output :-</p>
  
  <pre><code>Thanks for using JUnit! Support its development at https://junit.org/sponsoring
  ╷
  ├─ JUnit Jupiter ✔
  └─ JUnit Vintage ✔
  Test run finished after 24 ms
  [         2 containers found      ]
  [         0 containers skipped    ]
  [         2 containers started    ]
  [         0 containers aborted    ]
  [         2 containers successful ]
  [         0 containers failed     ]
  [         0 tests found           ]
  [         0 tests skipped         ]
  [         0 tests started         ]
  [         0 tests aborted         ]
  [         0 tests successful      ]
  [         0 tests failed          ]
  </code></pre>
  
  <p>The tests are still not being run.</p>