Monday, January 24, 2011

Building Test Suite in Selenium IDE

Test Suite:

A test suite is a collection of test cases which is displayed in the leftmost pane in the IDE. The test suite pane can be manually opened or closed via selecting a small dot halfway down the right of the pane (whic is the left edge of the entire Selenium-IDE window if the pane is closed).

The test suite pane will be automatically opened when an existing test suite is opened or when the user selects the New Test Case item from the File menu. In the later case, the new test case will appear immediately below.

Creating Test Cases:

Before creating a test cases, login to following application and click through the links http://demo.actitime.com/

Now create a test case. To create a test case,
  1. Open Selenium IDE
  2. Go to File menu > New Test Case
  3. Click on "Record" button
    • Open http://demo.actitime.com/
    • Enter Username as "user"
    • Enter Password as "user"
    • Click on "Login" button
    • Once you enter into the application, right click on the firefox box (within the application and select "assertTitle actiTIME - Enter Time-Track"
    • Click on "Stop Recording" button 
  4. Now to save a test case, select File > Save Test Case
  5. Save this test case with name "01_Login.html" into C:\SIDE folder (or any folder you want)
  6. You can debug/verify this test case, by running it.
Similarly record some test cases by clicking on "Tasks" and "Reports" link and assert the page. Save those test cases as "02_Tasks.html" and 03_Reports.html"

Creating a Test Suite:

To create a test suite in Selenium IDE
  1. Go to File menu > New Test Suite
  2. To add the test cases: Go to File > Add Test Case
  3. Navigate to the location of your test case (in our case C:\SIDE)
  4. Select 01_Login.html, click on "Add"
  5. Repeat steps 2-4 for more test cases
  6. To save your test suite, select File > Save Test Suite and name it as ActiTimeTestSuite.html
Your test suite should look like this.

Figure: Test Suite in Selenium IDE


No comments:

Post a Comment