Thursday, January 27, 2011

Running Selenium IDE Test Suite

Running Test Suite

Test suite prepared in the Selenium IDE can be run in a several way. Look at the Following are 3 methods with the help of which you can run the test suite prepared in the selenium IDE

1. From the Selenium IDE:

a. We can run the designed selenium test suite from the selenium IDE itself. Please refer Building Test Suite in Selenium IDE link which will guide you how to prepare selenium test suite.

b. Open the saved selenium test suite. Click on File > Open Test Suite. This open all your test cases.

c. Click on "Play entire test suite" button (First green arrow button). 

Selenium will run all your test and produces the test results in the "Results" pane.

2. From Selenium RC

We can run the same selenese test scripts by using Selenium RC server.
To run the HTML test suite, we use -htmlSuite command.

-htmlSuite requires you to specify:
The syntax of -htmlSuite command is:
-htmlSuite(browserString, startURL, suiteFile, suiteFile, resultFile)

where,
  • browserString is the browser name ex: "*firefox"
  • startURL is the base URL ex: http://demo.actitime.com/
  • suiteFile - Test Suite file lcation ex:  C:\SIDE
  • resultFile - You need to create a blank html file named results.html and specfify the path of thos file. Ex: C:\SIDE\results.html
Follow these steps to run the suite:

1. Create a HTML file that will keep your test results Ex: C:\SIDE\results.html
2. Oprn a command link
3. move to the selenium-server.jar location Ex: cd D:\selenium-remote-control-1.0.3\
4. Now the -htmlSuite command with required arguments.
Ex: java -jar selenium-server.jar -port 4444 -htmlSuite *firefox, "http://www.google.com" "c:\SIDE\ActiTimeTestSuite.html" "C:\SIDE\results.html"

You will see Test Runner will open and start running your tests in firefox browser

After the test script is done, you can check the test results in the HTML file you provided as argument i.e., C:\SIDE\results.html

Your test results should look like this:

Figure: Test Results




No comments:

Post a Comment