Nagarjuna
Nagarjuna

Reputation: 11

Unable to run testng file using run as Testng Test

I am having maven project with testng files in src/test folder. When I run the Maven install commend I see all testng are running. But while I am trying to run one testng file individually as run as --> Testng Test. I am getting below exception.

org.testng.TestNGException: Cannot find class in classpath: HelloClass

I am able to generate testng class files and saved under target/test-classes folder using maven build option.

Upvotes: 1

Views: 289

Answers (1)

Sharon
Sharon

Reputation: 146

Try move all your test classes from src/test/java into src/main/java

Upvotes: -2

Related Questions