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

Pulling Steps into a Loop

6 Answers 88 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Adam
Top achievements
Rank 1
Adam asked on 02 May 2014, 09:41 PM
So it looks like all documentation I'm reading states that in order to loop certain steps, you need to drag said steps either into or underneath your Loop step. I'm not sure if I'm just missing how to do this or perhaps there's a bug here, but this doesn't appear to be how this functions. In my attached screenshot I dragged 10 steps below the loop step and what appears to be happening is the loop just runs through ALL steps in the test not just the ones below it.  Could someone provide some info as to maybe what I'm doing incorrectly here??

6 Answers, 1 is accepted

Sort by
0
Konstantin Petkov
Telerik team
answered on 05 May 2014, 08:29 AM
Hi Adam,

I can confirm the loop executes only the steps being dragged inside that.

Do you mean this test executes 9 times all steps? I see it's data-driven so the number of iterations on playback depend on the data being attached to the test.

Regards,
Konstantin Petkov
Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
Adam
Top achievements
Rank 1
answered on 05 May 2014, 12:09 PM
That is correct Konstantin. It is looping through all steps before and after the loop step every iteration. 
0
Adam
Top achievements
Rank 1
answered on 05 May 2014, 12:11 PM
Also wheb dragging steps the only option is before or after the loop step, not inside of it.
0
Konstantin Petkov
Telerik team
answered on 05 May 2014, 12:23 PM
Hi Adam,

So I assume that was indeed a data-iterations case. This is exactly as the data driven test is supposed to perform, regardless if there is a 'loop' step.

There is a known issue where you can't drag a step inside a logical one (like 'loop') if that logical one is the last in the list. You can work-around that by adding another step temporary after the 'loop' so that you can drag those you need inside the 'loop' one. Does that help?

Regards,
Konstantin Petkov
Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
Adam
Top achievements
Rank 1
answered on 05 May 2014, 01:42 PM
Correct, this was a data-iterations case.  So I added a place holder step at the end and was able to move the steps I'd like to loop inside the Loop step(success).  However, the loop now only iterates the first record of the .csv file over and over for the 9 times I have it set to loop instead of the nine individual records that are in the file. I have the correct rows filtered in the data binding and it was iterating every row as expected before I dragged them into the loop step.
0
Konstantin Petkov
Telerik team
answered on 06 May 2014, 08:03 AM
Hi Adam,

This scenario works fine for me - I get the expected result for a data-driven step in a loop. Please make sure the step data-binding is correct.

If you still experience the problem please send the exact test that doesn't execute as expected along with the test execution log. You can also submit a support ticket to send private data.

Regards,
Konstantin Petkov
Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
Tags
General Discussions
Asked by
Adam
Top achievements
Rank 1
Answers by
Konstantin Petkov
Telerik team
Adam
Top achievements
Rank 1
Share this question
or