1

So I've seen this error is rather common, however most responses relate to Eclipse. I am using Intellij IDEA and getting the same error. This error is a little different than others in that it specifies not only the java test file, but the package as well. Other errors I've seen did not mention the package in the error.

So far I have tried: 1. Set CLASSPATH=%Path to dependancy module1%;%Path to dependancy module2%;%Path to SeleniumServer jar%;%Path to code libraries%;%Path to TestNG jar%;%Path to XML file%, etc... 2. Invalidating and rebuilding cache in IDEA. 3. Verifying that the package is actually specified in the XML file.

Extra info: I am not using Maven, or I would just use that for the scheduled runs I'm going for. IDEA Community 15.0.6. TestNG 6.8.8.

M_Tech
  • 330
  • 2
  • 7
  • 16
  • Should have noted the Error syntax is: "Could not find class in classpath: tests.NBATest". And both the 'tests' package, and it's parent directory my src are in the classpath. – M_Tech Jul 06 '16 at 15:42
  • How are you invoking your test suit? – Amol Chavan Jul 06 '16 at 16:10
  • Well, by command line. As the title says "..Command Line Test Run Error..." :) – M_Tech Jul 08 '16 at 14:20
  • Have you tried this http://stackoverflow.com/questions/11896791/how-to-run-testng-from-dos-prompt – Amol Chavan Jul 08 '16 at 14:25
  • Yep, spent quite a while trying to get the classpath right for all the module dependancies, the test.java file, the testng.xml file, etc. No progress at all still getting the same error. That's why I wonder if it is a TestNG or Intellij bug. – M_Tech Jul 09 '16 at 11:32

0 Answers0