Running test as a step with multiple iterations

2 Answers 10 Views
General Discussions Test Execution Test Recording
Mackie
Top achievements
Rank 1
Iron
Mackie asked on 15 Apr 2025, 02:27 PM
We have a web test where we run it as a step on another web test but before it goes to the next step, the test that's being executed as a step goes thru all of the iterations first when we do a partial test run 'Run To Here". Is there a way for us to execute the test as a step without going thru all of it's iteration and only do the first one and process to the next step?
Steven
Top achievements
Rank 2
Iron
commented on 15 Apr 2025, 02:45 PM

So Mackie,

What I'm assuming from your question is that you have:

  • Test Step 1
  • Test Step 2
  • Test As Step
    • Test As Step 1
    • Test As Step 2
    • Test As Step 3
    • Test As Step 4

  • Test Step 3

Are you trying to, for instance, to Run to Step -> Test As Step 2?

Steven
Top achievements
Rank 2
Iron
commented on 15 Apr 2025, 03:07 PM

Have you tried a 'While Loop' then an 'if...else' to manage your condition for executing the other steps? Just an idea.

https://docs.telerik.com/teststudio/features/logical-steps/while-loop

SSq

Mackie
Top achievements
Rank 1
Iron
commented on 15 Apr 2025, 03:12 PM

I haven't tried out using while loop for this situation.

2 Answers, 1 is accepted

Sort by
0
Mackie
Top achievements
Rank 1
Iron
answered on 15 Apr 2025, 02:50 PM | edited on 15 Apr 2025, 02:52 PM

So what I currently have is:

  • Test As Step (2 iterations)
    • Test As Step 1
    • Test As Step 2
    • Test As Step 3
    • Test Step 4
  • Test Step 2
  • Test Step 3

Where Test As Step have 2 iterations but what I am trying to do is when I do a 'Run To Here',   I want to execute the first iteration in Test As Step then proceed to Test Step 2, Test Step 3, etc. I am not sure if this is possible without filtering the data binding.

0
Elena
Telerik team
answered on 17 Apr 2025, 08:37 AM

Hi Mackie,

The possible approach for your needs, other than filtering the data source, is to use the partial test run options and it is as follows: 

  1. Let's use the following parent test structure for the example:
    • Step 1. Navigate
    • Step 2. perform some action
    • Step 3. Test as step.
    • Step 4. continue the scenario with other action

  2. Open the parent test and select step 2. Then use Run-> To Here. This executes the parent test to that step and connects the recorder to the browser. 

  3. Now open the child test which is called as step in step 3. Here you have two options to execute it in the running browser:

    • Option 1: Select the first step and use Run-> From Here option. This executes the child test starting from the selected step to the end of steps for one single iteration (partial test runs execute one iteration).

    • Option 2: Select all (or any sequence of) steps and use Run-> Selected Step(s) option. This executes the selected steps from child test for one iteration. 

  4. Then switch to the parent test and continue its execution from step 4. You can again use the partial run options From Here or Selected steps.

  5. In the case when the child test is the first step in the parent test: 

    • You start the sequence by opening the child test and execute it using Run-> To Here on its last step. This executes the child test to that step and connects the recorder to the browser.

    • Then you can switch back to the parent test and continue running steps using the From Here and Selected steps options. 

I hope this helps! 

 

Regards,
Elena
Progress Telerik

Enjoyed our products? Share your experience on G2 and receive a $25 Amazon gift card for a limited time!

Tags
General Discussions Test Execution Test Recording
Asked by
Mackie
Top achievements
Rank 1
Iron
Answers by
Mackie
Top achievements
Rank 1
Iron
Elena
Telerik team
Share this question
or