I have written a test suite using TestNG. I have included only one test.java file for my service. I have created the testng.xml file as well. When I run the testng.xml file, I’m getting below error:
Error: Could not find or load main class org.testng.remote.RemoteTestNG
Edits: My testng.xml looks like:
<suite name="TestAll"> <test name="testService"> <classes> <class name="com.ui.business.service.impl.myservice.test.MyServiceTest"/> </classes> </test> </suite>
I have kept the testng.xml in the root folder. The project compiles with Maven. My service class is in com.ui.business.service.impl.myservice package. When I run the testng.xml with “TestNG Suite”, I get this error. Please suggest what to do for resolving this classpath issue.