Tuesday, 5 January 2016

TestNG Eclipse Plugin Installation - Offline



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"
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEga94J2iM5q_7UPejxAP18_f0Jop-thXqeyhLabTeF_wlN8gv4pCpxlbxx5Jhow5LdznKHNF6a3_tWq4CUHStgSQcGn6yxcoVbttT8HPWEKpBIXS7EFE1YIrVlmqNCooVtOG1vkvlJSGck/s512/eclipse-testng-1.jpg
Now click on "Browse"
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgShyphenhyphensP4VS99-R8obkDOywNLeG3hpp-LQF4lLp6rEL0dqQYOFsBWb4DVpIhyphenhyphen4bMg1yIWlhpXR3v1lIqZBcwmzRs0VaeUqdHBRIXumqwmyLyCBZ8nfYT1GdcmyRBK5Lsrav76YuVwGVQ5cU/s522/eclipse-testng-2.jpg
Now select the folder "testing-eclipse-plugin"
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQ9WWKVhlBHjkjFYWc8kojN6mQ0O9U75PuToyqEOQFwN8Uf4bR_XMqOP2wuvBP1ejF37FB0JgTUhW37-Vy0HQJ88Y3a7NB9Otl5be6DupIHcDVN2UAhW2CxqN1FSsZyYXHt2uw56aWW28/s512/eclipse-testng-3.jpg
Now click on "ok"
Project will be created
Now right click on the project and click on "export"
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvonfwCyhxJ-mSv25XQuMbDg2FL76TEknGMeAc0nNIwyI-CHhTl5rmp2cbahnIBsVET2qJMZjO9z0ObAefBttXVqrDHcO5mDS-w_5cfTwReXOTvk3PU3hTPmrJaCCOrLv4hcIuLQFRBp0/s441/eclipse-testng-4.jpg
Now select "Plug-in Development > Deployable plug-ins and fragments"
Click on "Next"
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUsWOohgvuuaJfmCFM92G60ryftaz6pjaE4rhEF-nUofHYybC2GhQ4dfb-FlsyiVd4-Gldul4NsGp__hdTH5i0YDpXoxXEGjhWJ74469Feh9FGcCIylSzHkLls_xVnciacdNoyj1Vykhg/s628/eclipse-testng-5.jpg
Now click on "Browse" and select the target folder
Click on "Finish"
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTKH0r7iSj4MEEPyAofrfQYBtUBPjXcxQWd_gkM98MFENLEzFRlujOjQJnJA8YmRFmIIlAHdmCTWV_kEt9Ih26bHa1rOl5gv0es59Mri5eNOuk7hdC0oNZunwRH-lW5kXFEKcMW6ucoD8/s512/eclipse-testng-6.jpg
Jar will be generated as like shown in the below image
This is the plugin jar which we required
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3FHKJV-V9ScDSZm50kS4_cnCF5BaioRwrcnGY2ZahX_jfIkGfX76CkixlAPit6ZHo7YPKWQ8lJjMHvsv3ZAiGm-GkFxBX0MoqSybUH8JPLbwSmFDGl6lLy0iUJQwv-NuP0cPYEtpIRXg/s788/eclipse-testng-7.jpg
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


No comments:

Post a Comment