Search This Blog

Wednesday, August 4, 2010

Sample Selenium Test Suite

TestSuite.html
Test suite for the whole application
Access main page
Login to application
Change address
Logout from application











Open fire fox not selenium IDE and paste this link in the address bar

chrome://selenium-ide/content/selenium/TestRunner.html?baseURL=http://localhost&test=file:///dir/testsuite.html&auto=true



replace http://localhost with the baseURL of your server






Running Test Suite from command line
If you want to run a number of tests from the command line - for example, as an acceptance test step, or as a part of the checkin, you have a couple of options.
1) Selenium RC provides convenient command-line support for running HTML Selenese tests from the command-line or with Ant: http://www.openqa.org/selenium-rc/selenese.html
2) Create a batch file that launches Firefox pointed to the suite. For example, on Windows, my batch file looks like:
"C:\Program Files\Mozilla Firefox\firefox.exe" -chrome "chrome://selenium-ide/content/selenium/TestRunner.html?test=file:///C:/tests/AllTests.html&auto=true&baseURL=http://mysite.com " -height 900 -width 900