TestNG – Selenium RC

Below are prerequisites, steps and approach for using TestNG with Selenium RC:

1. Download Selenium RC from http://seleniumhq.org/download/
2. Extract the files to the following location C:\selenium-rc.
3. Download TestNG from http://mac.softpedia.com/progDownload/TestNG-Download-48276.html
4. Extract the files to the following location C:\testng-5.12.1.
5. Download and Install JDK 1.5 or above to the following location C:\Program Files\Java\jdk1.5.0_11.
6. Download Eclipse IDE from http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/helios/SR2/eclipse-jee-helios-SR2-win32.zip

TestNG Installation:
1. Open the Eclipse window >> Goto Help>>Install New Software.
2. Click on Add button and enter TestNG into “Name” field and http://beust.com/eclipse into “Location” field.
3. Complete the installation process and restart the Eclipse.

Creating TestNG test:
1. To create a testng test goto “File>>New>>Java Project”.
2. To create a package, right click on package name and goto New>>Package.
3. Configure the Build Path.
4. Add “selenium-server.jar, selenium-java-client-driver.jar and testng-5.12.1.jar” in Libraries.
5. Now create a Java test file which contains the test case.

Execution of TestNG test:
1. To execute the test do right click and goto “Run as>>Run Configuration”
2. Select TestNG and click on New launch configuration icon.
3. Browse your project, class and click on “Apply” and then click on “Run”.

Please feel free to post queries or questions related to above.

Rohit Singh


Get A Free Quote

4 thoughts on “TestNG – Selenium RC

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.