Regarding TestNG in eclipse - eclipse

I am trying to add TestNG in Eclipse. I installed/uninstalled multiple times but still not able to get TestNG under "Run As". When I look under installed software, it shows TestNG there but no where else not listed in library. I have latest version for java and testNG .Not even seen in preferences Please help.

Related

Unable to add a Junit file in eclispe

I have an eclipse java project (screen shots attached). I added Junit libraries to my project and when I say New file, I don't see Junit option.
Once Junit libraries are added, eclipse should be able to show the Junit files. Not sure why it wouldn't
You can install it by the following:
Help -> Install New Software
within Eclipse. In the Work with: field, your Eclipse version should have a Site entry in the dropdown, such as:
http://download.eclipse.org/releases/luna/201406250900
Once you choose this, you can then navigate to:
Programming Languages -> Eclipse Java Development Tools
It should then appear afterwards

Not able to add TestNG library in Eclipse java build path

Not able to add TestNG library in Eclipse java build path. I have installed/uninstalled multiple times but still not able to get TestNG under "Run As". When I look under installed software, it shows TestNG there but no where else it's listed like Add Library and other places. Please help.
I am using Eclipse Neon. TestNG 6.13.0.

Run as TestNG not appearing in Eclipse

I am trying to setup TestNG and run a sample test using TestNG.
I have installed the TestNG plugin in Eclipse but when I try to run the test as TestNG, the option is not showing in 'Run As', it only shows Run As JUnit.
Can anyone tell the reason why it is not appearing? or am I missing something?
I tried uninstalling TestNG and re-installing it again, but no go..
One more thing, am I not allowed to use JUnit and TestNG at the same time?
My eclipse has got just the JUnit in Window -> Preferences -> Java -> JUnit but I can't see TestNG, why is this?
Please advise.
Thanks.
As a workaround, I tried to install 'eclipse-jee-mars-R-win32-x86_64' and upgraded JDK from 1.6 to 1.7, it worked for me. So right now am not using Eclipse Luna anymore.
Doing this will not disturb your Workspace. All your projects remains same. Only thing is you need to point eclipse to your previous Workspace itself.
Thanks all for your comments.

How to install TestNG in eclipse Kepler

I am trying to install TestNG (which I have never used before) in eclipse Kepler (4.3). I've tried to follow the directions provided on the TestNG site (http://testng.org/doc/download.html), but they do not work. The link (http://beust.com/eclipse/) just takes me to a page with a jar file. My experience is that when you use the installer within eclipse, it expects to be provided with a "p2" repository site. If I try to set up a site with the address provided, it fails.
On a related note, do I need to install TestNG as something additional (outside eclipse), or is the eclipse plug-in sufficient?
It is working fine on my machine. I just installed TestNG on my eclipse by following the steps below:
Click on Help > Install New software
Add the link http://beust.com/eclipse in Work with text box as shown below.
TestNG feature will be shown, expand the tree node then verify the version.
Tick the check box of TestNG
Click on Next button then Finish button.
I guess you enter wrong software update site. Remove the / and extra spaces around the link "http://beust.com/eclipse/" then try.
Nothing to install outside eclipse.
TestNG can also be installed in Eclipse by using "Eclipse Marketplace..." Below are the steps:
Open eclipse
Go to Help -> Eclipse Marketplace...
Do search for TestNG (Type the text TestNG in Find text box > Click Go button)
After searching: Click Install button at TestNG for Eclipse area
Follow the further instructions by eclipse
After successful installation: Go to Window -> Preferences. TestNG is enlisted at the left panel in pop-up.
Download Testng.jar and add testng jar as external-lib in eclipse. Eclipse will identify the testng.
Currently, TestNG is not available at https://beust.com/eclipse
To install TestNG in Eclipse version – 2019-03 or above, You can follow these steps:
Go to Window > Install New Software.
Enter https://testng.org/testng-eclipse-update-site/<TestNG Version> Refer to this site for TestNG Version: https://testng.org/testng-eclipse-update-site/
Select TestNG Options and Accept the agreement. Once you complete the process, TestNG will get installed.
Reference: https://testng.org/doc/download.html

Required plug-in 'org.eclipse.pde.junit.runtime' could not be found

I'm working with Eclipse Indigo and need to use Junit PDE to test my plugin functionality. I installed Junit, and these two plugins:
http://market.eclipsesource.com/yoxos/node/junit.extensions.eclipse.quick.pde.source.feature.feature.group?mpc=true&mpc_state=
http://market.eclipsesource.com/yoxos/node/junit.extensions.eclipse.quick.pde.feature.feature.group?mpc=true&mpc_state=
But when I tried to run my test case (Run->Run Configurations->JUnit Plug-in Test) I keep obstaining the following error: Required plug-in 'org.eclipse.pde.junit.runtime' could not be found.
If someone could telle what else do I need, or what I'm doing wrong I'll be grateful.
You can check if you have the org.eclipse.pde.junit.runtime installed by going to Help->About Eclipse, Installation Details, then finding the plugin in the Plug-ins tab (column Plug-In Id). If it's not there, you can install it from the Eclipse update site. If it is there, then you have a correupted installation, and it's probably a good idea to restart from scratch with a new installation of the Indigo PDE.
Does it look a bit like Right target platform for running JUnit plugin tests in Eclipse Indigo?
Could you share your .launch-config with us? Does "Validate before launch" give any error? Did you setup the correct JUnit-dependencies in the build-path? As far as I know, junit.runtime refers to JUnit 3.
What surprises me a bit is that you had to install JUnit---if you're using the standard Eclipse JDT, JUnit is included. What did you do exactly?