TestNG – Installation process

Installation of testng is very simple and takes only few minutes.
Prerequisites:
Make sure your run time and compile time versions are same.

Open eclipse Go to Help-> install new software

installng

addrepo

Now accept the terms and conditions and click finish.
Click on OK if you  encounter security warning.
Eclipse will ask for a restart for the changes to take affect so give OK.

To check if it is successfully installed

checksuccessinsta

It should be available in show view.

TestNG -Plug-in org.testng.eclipse was unable to load class org.testng.eclipse.ui.TestRunnerViewPart

1.“Plug-in org.testng.eclipse was unable to load class org.testng.eclipse.ui.TestRunnerViewPart
2.Eclipse Juno : TestNG installed but inaccessible
3.CoreException: Plug-in org.testng.eclipse was unable to load class

I have some solutions for all the above errors. Try it and let me know.

1.Check if your Compilation and Execution points to same version.
if not change the compiler version and the runtime to jdk1.7

if that is same and you still facing the error.
Go to Eclipse->Help->About Eclipse SDK->Installation Details->Configuration

There you will find information on
java.class.version=51.0
java.runtime.version=1.7.0_79-b15

Check if it both are of same versions and the jre points to your custom path. If in case
java.class.version=50.0
java.runtime.version=1.7.0_79-b15 you will get the above error – unable to load class

eclipse-conf

Solutions :

This means that the eclipse uses its own jre for loading class and hence any overriding is not being accepted.Please Go to eclipse.ini and add your vm arguments so that eclipse runs using the jre mentioned by you

eclipse-ini

Now restart the eclipse.

Hope this helps

How to set classpath in java

Java Classpath is used to find java class files.It can be specified using environment variable or using -cp or -classpath in command line.

1.Using command line

set CLASSPATH=”%JAVA_HOME%/lib

classpath

2.Using Environment Variable

Go to My Computer->Properties->Advanced->Environment variables->System variables->New

classpath-env

Done.You can check the classpath in command line using echo %classpath%.

You can also set your

 

How to set path in java on windows

Java path is mainly used to find the executable and this can be set using command prompt or using environment variables.

1.Using command prompt

Open command prompt (cmd)-> type “set path=C:\Program Files\Java\jdk1.7.0_79\bin”

set-path-variable

2.Using Environment variable editor

Go to My Computer-> Properties-> Advanced tab-> Environment Variables-> System varibles->New->

Variable name :Path

Variable value : C:\Program Files\Java\jdk1.7.0_79\bin

path-ev

Job done.You can check the path has been set successfully in cmd. Type echo %Path%.