TestNG is good framework inspired by JUnit, It is having advanced features than JUnit. I tried to install TestNG eclipse plugin to my Eclipse version of Juno. But I got some hell errors. Finally I was failed to install that in online. Then I tried to install that in offline. Initially I did some research on how to install TestNG plugin in offline and I found different jars for different versions of eclipse and some online forum users stated that they still getting some configuration issues. Then I decided to build suitable version of TestNG plugin with my own Eclipse. Follow the below procedure for successful installation
Download TestNG Eclipse Plugin Project
Download TestNG from the Github ( https://github.com/cbeust/testng-eclipse ). Once you download the ZIP file, extract it. Now you can see testing-eclipse-plugin folder in it. This is the Eclipse plugin project that we have to build.
Import Eclipse Plugin Project
Open your Eclipse
Click on "File > Import"
Now select "General > Existing Projects into Workspace"
Now click on "Next"
Now click on "Browse"
Now select "General > Existing Projects into Workspace"
Now click on "Next"
Now click on "Browse"
Now select the folder "testing-eclipse-plugin"
Now click on "ok"
Project will be created
Now right click on the project and click on "export"
This is the plugin jar which we required
Now copy this jar and paste in "dropins" folder of eclipse
Now restart the eclipse, Now you can see all TestNG options in active mode
Now click on "ok"
Project will be created
Now right click on the project and click on "export"
Now select "Plug-in Development > Deployable plug-ins and fragments"
Click on "Next"
Now click on "Browse" and select the target folder
Click on "Finish"
Jar will be generated as like shown in the below imageThis is the plugin jar which we required
Now copy this jar and paste in "dropins" folder of eclipse
Now restart the eclipse, Now you can see all TestNG options in active mode
Hi Srinivas,
ReplyDeleteI installed successfully but I am getting following error while running testng test in eclipse(no issues while running from mvn test). Can you please suggest how could i solve this issue.
java.lang.UnsatisfiedLinkError: Failed to create temporary file for /com/sun/jna/win32-x86-64/jnidispatch.dll library: Access is denied
at com.sun.jna.Native.loadNativeDispatchLibraryFromClasspath(Native.java:776)
at com.sun.jna.Native.loadNativeDispatchLibrary(Native.java:736)
at com.sun.jna.Native.(Native.java:131)
at org.openqa.selenium.os.Kernel32.(Kernel32.java:34)
at org.openqa.selenium.os.ProcessUtils.killWinProcess(ProcessUtils.java:133)
at org.openqa.selenium.os.ProcessUtils.killProcess(ProcessUtils.java:81)
at org.openqa.selenium.os.UnixProcess$SeleniumWatchDog.destroyHarder(UnixProcess.java:247)
at org.openqa.selenium.os.UnixProcess$SeleniumWatchDog.access$200(UnixProcess.java:201)
at org.openqa.selenium.os.UnixProcess.destroy(UnixProcess.java:125)
at org.openqa.selenium.os.CommandLine.destroy(CommandLine.java:155)
at org.openqa.selenium.remote.service.DriverService.stop(DriverService.java:196)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:94)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:620)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:670)
at org.openqa.selenium.remote.RemoteWebDriver.quit(RemoteWebDriver.java:516)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:132)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:142)
at org.openqa.selenium.chrome.ChromeDriver.(ChromeDriver.java:170)
at org.openqa.selenium.chrome.ChromeDriver.(ChromeDriver.java:159)
at org.openqa.selenium.chrome.ChromeDriver.(ChromeDriver.java:116)
at sample.maven.proj.suiteA.TestA1.testA1(TestA1.java:13)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:86)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:643)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:820)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1128)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:129)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:112)
at org.testng.TestRunner.privateRun(TestRunner.java:782)
at org.testng.TestRunner.run(TestRunner.java:632)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:366)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:361)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:319)
at org.testng.SuiteRunner.run(SuiteRunner.java:268)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1246)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1171)
at org.testng.TestNG.run(TestNG.java:1066)
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:113)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:206)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:177)
Looks like it is having problem with /com/sun/jna folder read, write permissions. Update /com/sun/jna folder R/W permissions
DeleteI am facing the same issue , can any one please explain???
ReplyDeleteAny solution?Facing Same issue
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteAwesome!!
ReplyDeleteI was trying to install TestNG plugin from last few days but i could not found any solution. Now TestNG is installed successfuly with above process.
kya ilaaj dhundha hain hats off to you buddy.
ReplyDeleteWhen am installing Testng plugins i got below execption eclipse.Please help me to reslove this.
ReplyDeleteUnbound classpath container: 'JRE System Library [JavaSE-1.7]' in project 'org.testng.eclipse' org.testng.eclipse Build path Build Path Problem
The project cannot be built until build path errors are resolved org.testng.eclipse Unknown Java Problem
Wow!!! thanks a ton I could install TestNG with the above procedure. Good stuff
ReplyDeleteHi.I dont see plug in deployment option after I click on export
ReplyDeleteHi. This was really cool.
ReplyDeleteCan u pls tell me How can we do similar installation for Maven in eclipse..?
I have installed testng in ecplise kepler but unable to view in prefaces. Need help.
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteWhile exporting getting error saying
ReplyDelete'Export Plug-ins' has encountered a problem.
Processing inclusion from feature org.eclipse.pde.container.feature: Bundle org.testng.eclipse_6.12.0.qualifier failed to resolve.:
Missing required plug-in org.testng_[6.9.12,7.0.0).
Missing required plug-in com.google.guava_[15.0.0,22.0.0).
I'm facing the same issue can anyone help?
Delete