Skip to content

Instantly share code, notes, and snippets.

Created September 8, 2016 06:11
Show Gist options
  • Save anonymous/0478dca7c1334f20c60c3af8d13ffec7 to your computer and use it in GitHub Desktop.
Save anonymous/0478dca7c1334f20c60c3af8d13ffec7 to your computer and use it in GitHub Desktop.
TestNG Griggi setup
Install IDE
https://eclipse.org/downloads/packages/eclipse-ide-java-developers/mars2
Install testNG plugin for eclipse:
http://testng.org/doc/download.html
Verify if plugin is installed:
http://wiki.eclipse.org/FAQ_How_do_I_find_out_what_plug-ins_have_been_installed%3F
(Below steps are probably not needed, just informational here as chromedriver binary is part of GriggiTests repo)
Install chrome or chromium and take note of the version you have installed.
Then install chrome driver from here:
https://sites.google.com/a/chromium.org/chromedriver/
Insaller Getting started: https://sites.google.com/a/chromium.org/chromedriver/getting-started
Git clone: GriggiTests
Import above as project in eclipse IDE GUI.
File > Import... > Existing Project into workspace > select root directory of the GriggiTests
import all Jars
Project -> Properties -> Java build Path -> Add External Jars -> Select all the Jars in the libs Folder
From the eclipse GUI project source tree, find src/mainTest.xml; right click on it and select "run as TestNG".
@pocha
Copy link

pocha commented Sep 8, 2016

TestNG needs to be installed from inside Eclipse & not separately - https://www.google.co.in/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=install+testng+in+eclipse

Importing jar isnt needed as external jars are now moved to internal jars & now are path of classpath with relative entry.

If its first time with Eclipse, you need to add JRE to the project as well . Without this, you will see errors like java.lang.Object not resolved because java isnt accessible.
Project -> Properties -> Java build Path -> Select Libraries tab -> Add Library -> JRE System Library (Next) -> Workspace default JRE (it should show the latest jdk installed on your system) -> Finish

Chrome driver is OS specific. So you may like to get your own from the links mentioned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment