Is TestNG required to be installed in Eclipse from Help, even when the dependency for same is already copied in pom.xml? | Selenium Forum
P
Pravin V. Kumbhare Posted on 26/08/2020

I just created a new Maven project and copied the dependency for Selenium 3.141.59 and TestNG 6.14.3 (as I found it the most stable version on mvnrepository).

On running my basic @Test script, I got the error dialog on Eclipse as Couldn't contact the RemoteTestNG client. Uncheck the ‘Use Project testngjar’ option from your Project properties and try again.

I Googled for this issue and found that the TestNG versions in my pom.xml and in Help > Install New Software, are different. Since I already had copied the dependecy for desired TestNG version in pom.xml, I thought installing the TestNG in Help is not required. I simply removed this pre-installed TestNG from Help.

I restarted Eclipse, refreshed the project, and tried running the above script.

Now I'm getting the error as The selection cannot be launched, and there are no recent launches.


A
Ashish Thakur Replied on 27/08/2020

If you install testng as a plugin in eclipse then you will be able to see the options like run as testng test or testng console window.

Adding jars in maven can do the work if you just need to run from maven

If you want to run from eclipse then you need to add as a plugin inside eclipse