Skip to content
rahuldantalwal edited this page Apr 27, 2016 · 1 revision

Introduction

Framework supports repeatable execution/iteration of a particular step/testcase. Iteration logic can be used in conjunction with any value range, condition or any variable. If we have multiple rows of test data then we can also specify which index of data to be used.

Example

1. @R Reusable_Test_Cases:CLEAR_WISHLIST; @I {1 to {$totalProducts}};
  This statement will call clear wishlist test case as much times as
  the no of items on wishlist page.
  totalProducts is the variable which the count of remove icon present on the page

2. @R Reusable_Test_Cases:CLEAR_WISHLIST; @I {1 to 10};
   This statement will call clear wishlist test case ten times and every time the test data will be picked based on iteration index. for example - for 2nd iteration all test data will be picked from 2nd row only.

3. @R Reusable_Test_Cases:Login; @I {2};
  This statement call the login test case 1 time with test data to be used from 2nd row.  

4. @R Reusable_Test_Cases:Login; @I {2,3,4};
  This statement call the login test case 3 times, with test data picked from row 2nd in first iteration, 3rd from 2nd iteration and 4th from 3rd iteration.

Note:

    If @I annotation is not present the test step will use 
    first row's value  from data table.
Clone this wiki locally