data driven end test

1 Answer 106 Views
Coded Tests Test Execution
Vitro
Top achievements
Rank 1
Vitro asked on 11 Jun 2021, 09:09 AM

Hi,

Is there  a way or a coded step to stop the data driven loop if the data is not found? Instead of running all the remaining items over I want to stop the test and move on to the next test instead. 

Thanks

1 Answer, 1 is accepted

Sort by
0
Plamen Mitrev
Telerik team
answered on 14 Jun 2021, 01:06 PM

Hello Vitro,

It is possible to stop the execution of all steps after a certain failure and also abort the execution of the remaining iterations for this particular test. Meaning that the test list execution will proceed directly with the next test in the list. 

I prepared a sample Test Studio project with two tests, which are both in the same list. Test1 has 3 steps and local data that will result in 3 iterations. However, the coded step will fail at the second iteration and will stop the execution of this iteration and the last iteration, as well. Please explore the code and comments for more details and adjust the condition in the "if" statement according to your test scenario.

When you execute the test list with both tests, you will see in the Results tab that the execution of Test1 stops after the failure in the second iteration. The last step there and the third iteration are not run and the test execution proceeds to the next test -> Test2. 

I hope the above suggestions and sample project will be helpful to you. Let me know if you need further assistance, or you have any follow up questions.

Regards,
Plamen Mitrev
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Test Studio course! Check it out at https://learn.telerik.com/.
Tags
Coded Tests Test Execution
Asked by
Vitro
Top achievements
Rank 1
Answers by
Plamen Mitrev
Telerik team
Share this question
or