This is a migrated thread and some comments may be shown as answers.

Data source iterations over test lists, not individual tests?

2 Answers 50 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Sander
Top achievements
Rank 1
Sander asked on 18 Aug 2014, 02:19 PM
Hi.

I've been creating small sub-tests for my test scenarios such as logging in, going to a specific page, ordering a product, etcetera. The goal is to be able to easily create varying test scenarios by using these small tests as building blocks. Now I've added in a data source to specificy my base URLs so I can run these tests on both test and acceptation enviroments, this is where this method seems to unfortunately break down.

When I add a datasource it automatically runs every test twice, one on test (row 1 of my excel sheet) and on acc (row 2 on my excel sheet), however it does this for every single substep. I want an entire testlist to finish while using data from row 1, and then another iteration of said testlist where it gets data from row 1. Right now it performs Step 1 twice, Step 2 twice, etcetera.

I've also tried creating one full test instead of a testlist where I use my small tests as test steps, but it still performs all of the possible iterations for step 1 before moving on to step 2. Is what I want not possible? If so, how would I ever go about testing an entire scenario on test before I do the full run on acc, without having to make one giant test without sub-tests in it?

Regards,
Sander

2 Answers, 1 is accepted

Sort by
0
Ivaylo
Telerik team
answered on 21 Aug 2014, 12:57 PM
Hello Sander,

Unfortunately this is how the data driven testing works. All iterations are executed before the test continues. In order to accomplish what you are requesting you will have to use non-iterative data driven testing which can be achieved only by using code. Please take a look at this article in order to proceed.

Regards,
Ivaylo
Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
Miguel
Top achievements
Rank 1
answered on 28 Aug 2014, 08:53 PM
Hello Sander,
It sounds like the issue is that each sub step is running through all of the rows in your data source before advancing to the next sub step. If this is the case your best bet would be to create a wrapper test where all your sub steps are nested in and adding the data source to the wrapper instead of each individual test. When running this from the test list you would only add the wrapper test instead of each individual sub step. By doing it this way Test Studio will look at the wrapper test and it's contents as a single test step and iterate through the data only when all the steps within the wrapper test are completed.

Let me know if this helps, reading through it I realize it is not a simple concept to grasp.

Best of luck.
Tags
General Discussions
Asked by
Sander
Top achievements
Rank 1
Answers by
Ivaylo
Telerik team
Miguel
Top achievements
Rank 1
Share this question
or