0
votes

I'm running TestNG file from maven and I'm getting this exception. I checked target folder of maven there are no classes generated

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test (default-test) on project Tes ts: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test failed: There was an error in the forked process

[ERROR] org.testng.TestNGException: [ERROR] Cannot find class in classpath: ai.dharma.web.test.functional.TestBaseSetup [ERROR] at org.testng.xml.XmlClass.loadClass(XmlClass.java:81) [ERROR] at org.testng.xml.XmlClass.init(XmlClass.java:73)

1
testng.xmlcodeThe Last Dark One

1 Answers

0
votes

Ok i found answer almost after 5 days of deep search..

it was folder structure,it should be "Src > Main > Java" + your regular package structure, maven searches through that structure for generating class..