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

Preventing a step from failing a test

1 Answer 67 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Steve
Top achievements
Rank 1
Steve asked on 06 Jun 2013, 07:10 PM
I have a data driven test. The second step is a login. The handle login is successful on the first iteration, however, subsequent iterations it fails since we are re-using the browser instance. I set the "continue on failure" option, but the subsequent iterations are marked as failed just because of the login step is not needed. How do I get around this?

1 Answer, 1 is accepted

Sort by
0
Accepted
Cody
Telerik team
answered on 06 Jun 2013, 10:24 PM
Hi Steve,

This problem is pretty easily overcome by properly architecting your tests. Place the core of your test into a sub-test. Leave just steps one and two in your current main test. Data bind the subtest, not the parent test.

You can actually do this very quickly and easily by selecting the core of your test (steps 3 to the end), right clicking and selecting "Create Test as Step". Test Studio will prompt you for the name of the new sub-test and do all the grunt work for you. Once done all you need to do is modify the data binding... remove it from the parent test and add it to the new subtest.

I hope this helps.

Regards,
Cody
Telerik
Free summer webinars on advanced web automation tactics hosted by Jim Holmes & Adam Goucher.
Reserve your seat today!
Tags
General Discussions
Asked by
Steve
Top achievements
Rank 1
Answers by
Cody
Telerik team
Share this question
or