Cannot find class in classpath using TESTNG

We integrate testng with our application, I created testng.xml and testngbuild.xml to build ant. When ant build starts, it throws. Cannot find class in classpath :. Actually I tried many times. But I'm still hopeless. Even I tried to copy the .class file manually to my application test directory. If you can do this, it throws another exception, as it cannot load the .class file

+2
source share
1 answer

Even I have encountered the same problem many times. You can try the below solutions that worked for me.

  • Click on a specific project -> Project-> Clean-> refresh

  • Due to other open source projects in the IDE. Save only the project you are working on, open and close other unrelated projects. Right-click-> Close Project.

  • And you will never believe that the culprit is the Excel sheet (I don’t know how this is related) when you open it, and a sepearate instance can be created with this, etc. Close it and execute kll for any process with the excel sheet will be resolved.

+4
source

All Articles