Run as TestNG not appearing in Eclipse - 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.

Related

Regarding TestNG in 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.

everything related to maven is missing from eclipse

For some reason everything related to maven has disappeared from my eclipse kepler installation. I can't update the project or build it, I can't start a new maven project and there is no trace of any maven related menu.
Any idea how to solve it?
Thanks.
Try in the Eclipse MarketPlace to see if the Maven Integration for Eclipse is installed. If not, maybe you can install it. If it is installed, I can not help you, but my recomendation would be to get a new Eclipse from their web.

Any way to control the version of Java Spring STS Gradle plug-in uses?

I am using the STS Gradle plugin in Eclipse (Indigo). I am running on MacOSX. Eclipse is running Java 1.6, but I have Java 1.7 installed as the default JRE and all my eclipse projects use it without error.
I am trying to get "gradle jettyRun" to work within Eclipse. It runs perfectly from the command line. However, when I right click on my web project and say "Run As"->Gradle Build... then select jettyRun from the dialog box, I get this error message:
invalid source release: 1.7
Does anyone know if there is anyway to fix this?
[Don't think it matters, but I am running Gradle 1.1]
As this issue suggests, provided you're using above version 3.0.0.M1 of the STS plugin, there should be a Gradle preference page where you can select the JVM installation to use.
Not sure for earlier versions of STS plugin. You can try setting the JAVA_HOME variable before launching your Eclipse. Might help.

Eclipse says 'Class not found' even though the classes are available

In Eclipse UI, I got the following problem,
If you see left side, the classes are available. I am able to build using Maven and run it successfully. But this Eclipse error highlighting is really annoying.
I am using Eclipse Indigo SR2 and installed Spring Tool Suite. Please help me on fixing this issue. Thanks.
try importing com.beatle.model.* and see what happens

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?