0

I have switched to a new branch and created new TestNG XML to run different test suite. But when I tried to run it as a TestNG suite eclipse only suggests run as configurations. I have set the suite path in TestNG but still not getting run as TestNG.

I have tried maven clean and project update as well. TestNG is already installed in eclipse.

What can I do to resolve this?

2 Answers 2

2

There are several possible reasons why the "Run as TestNG" option may not be available in Eclipse:

  1. TestNG plugin is not installed: To use TestNG in Eclipse, you need to have the TestNG plugin installed. If it is not installed, you can install it from the Eclipse marketplace.

  2. Incorrect TestNG library version: Ensure that you are using the correct version of the TestNG library that is compatible with your version of Eclipse.

  3. Invalid project setup: If your project is not set up as a TestNG project, you won't see the "Run as TestNG" option. You can set up your project as a TestNG project by right-clicking on your project and selecting the "Configure" option and then selecting "Convert to TestNG."

  4. Incorrect build path: Ensure that the TestNG library is included in your project build path. You can add the library to the build path by right-clicking on your project and selecting "Build Path" and then "Configure Build Path."

  5. Broken installation of TestNG: If you have installed the TestNG plugin, but it is not working, you may need to reinstall it.

Try these solutions and see if they resolve the issue.

1
  1. Help--->Install new software-->already installed --->TestNG (All)---> Uninstall ---> restart now (Eclipse will restart)

  2. After restart again Help-->Install new software --> Clicks on 'Add' ---> Name TESTNG URL - https://testng.org/testng-eclipse-update-site/7.4.0/ ---> Ok

  3. After install restart now Eclipse

  4. You got the TestNG

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.