0

I am trying to run testng form cmd after building the project from cmd as well, but I get the following error:

[TestNG] [ERROR]  Cannot find class in classpath: (name of testcase file)

What I read everywhere is to clean the project from eclipse, I tried but did not work, any ideas about what is happening? Thanks in advance!

Anna
  • 137
  • 2
  • 6
  • 15
  • Unzip WAR/JAR file and check if you can see the class files. – Ajinkya May 20 '15 at 07:39
  • Thanks, that was it, my classes are not there!! How can I make the build and include them? – Anna May 20 '15 at 07:48
  • When you compile the java files they create class files . `% javac Foo.java`. If there are no errors in your source file, the Java compiler will produce one or more .class files (one .class file for each class defined in the Foo.java source file). – Kurenai Kunai May 20 '15 at 09:07
  • While using Jar please include those class file too. If you are using there is option to select and make fatjar. Please note some of the license doesnot allow you to do this (unless you change the license of your application) – Allahbaksh Asadullah May 20 '15 at 12:02
  • Thanks for your answers, but can you please put an exmple? I don't really know what you mean – Anna May 20 '15 at 13:50
  • more info about the problem: http://stackoverflow.com/questions/30345774/build-project-does-not-include-all-the-classes – Anna May 20 '15 at 15:36

0 Answers0