Error Could not find or load main class org testng remote RemoteTestNG

0 votes

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

Please let me know how to fix this.

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 the 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 resolve this classpath issue.

Feb 16 in Java by Rahul
• 8,980 points
1,094 views

1 answer to this question.

0 votes

This worked for me:

  • Right click on your project

  • Click on Properties

  • Click on TestNG

  • Uncheck Use Project TestNG jar box

  • Click on Apply and Close

answered Feb 16 by Aditya
• 7,280 points

Related Questions In Java

0 votes
1 answer

How to resolve the error: could not find or load main class?

If you are getting error: could not ...READ MORE

answered May 28, 2018 in Java by Parth
• 4,630 points
5,820 views
0 votes
0 answers

Eclipse "Error: Could not find or load main class"

I have a project on my laptop ...READ MORE

May 7 in Java by narikkadan
• 10,840 points
190 views
0 votes
2 answers

“Could not find or load main class” mean?

Use the final modifier to enforce good initialization. Avoid returning ...READ MORE

answered Sep 18, 2018 in Java by Sushmita
• 6,900 points
3,120 views
0 votes
1 answer

What does “Could not find or load main class” mean?

First of all, you need to understand ...READ MORE

answered Dec 22, 2020 in Java by Gitika
• 65,850 points
274 views
0 votes
2 answers

What is the role of TestNG & JUnit frameworks in Selenium?

TestNG and JUnit are test frameworks . it ...READ MORE

answered Sep 4, 2020 in Selenium by Sri
• 3,190 points
1,576 views
0 votes
2 answers

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,500 points
7,792 views
0 votes
1 answer

Diff between WebDriver listeners and TestNG listeners?

This is not a very important concept ...READ MORE

answered Apr 14, 2018 in Selenium by king_kenny
• 3,710 points
4,350 views
0 votes
2 answers

Problem while using InternetExplorerDriver in Selenium WebDriver

enable trusted connection  in internet explorer by ...READ MORE

answered Aug 31, 2020 in Selenium by Sri
• 3,190 points
7,147 views
0 votes
1 answer

jQuery fix for "Uncaught TypeError: $ is not a function" error

 Use the following lines of code in ...READ MORE

answered Feb 16 in Java by Aditya
• 7,280 points
95 views
0 votes
1 answer

Can not find the tag library descriptor for “http://java.sun.com/jsp/jstl/core”

If you have a jstl.jar file while ...READ MORE

answered Feb 17 in Java by Aditya
• 7,280 points
22 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP