Forum Discussion

zareen's avatar
zareen
New Contributor
5 years ago
Solved

How to run test cases for selected rows in datasource

For each test in a test suite, i have multiple rows. But now i want to build a feature that will allow me to select the desired iterations ( Ex: run only for row 1,2,& 4) during run time and not run the test for all the rows specified in my test data. How can i achieve this?

  • In datasource hopefully you are using excel sheet. And in that case add one column named ExecutionFlag in the sheet. And set it as Y or N. Based on that write 2-3 lines o java/groovy code using if-else statement to manipulate this.

2 Replies

  • avidCoder's avatar
    avidCoder
    Super Contributor

    In datasource hopefully you are using excel sheet. And in that case add one column named ExecutionFlag in the sheet. And set it as Y or N. Based on that write 2-3 lines o java/groovy code using if-else statement to manipulate this.

    • Olga_T's avatar
      Olga_T
      SmartBear Alumni (Retired)

      Thanks for the suggestion, avidCoder !
      zareen , have you had a chance to try the above instructions?