Join 500+ Software Testing professionals. Solve problem and get your problem solved. Register Now!

0
[TestNG] [ERROR] Cannot find class in classpath: test.pack.TestClass

Solved 2 Answers 1461 Views
0 2
[TestNG] [ERROR]

Cannot find the class in the classpath: test.pack.TestClass

Originally posted at: https://www.linkedin.com/feed/update/urn:li:activity:6389872247590490112/

2 Answers

0
Best answer
0
From, Arunkumar Velusamy (https://www.linkedin.com/in/arunkumarvelusamy/)

Reasons could be,

1. class file name given in testng.xml is invalid and you could see that classpath printed in error message is not matching with actual classpath

2. compiled classes are not available inside the project or inside the jar file. Classpath printed in error message would be correct in this case.
answered by (29 points)
selected by
1
1
saved the xml file in the folder containing the class file and it worked for me.
answered by

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.
...