This is a migrated thread and some comments may be shown as answers.
Execute a specific step when test fails
5 Answers 12 Views
This is a migrated thread and some comments may be shown as answers.
Andreas
Top achievements
Rank 1
Andreas asked on 18 Nov 2015, 10:14 AM

Hi,

 I'm currently working with a trial license and testing our web solution, that has a login part and it must be ensured that every test will also log out at the end.

 If the test now fails at one point, how can I ensure that the log out step is called ?

 So is it possible to set a step as "run this, regardless what happens before" ?

 Thanks

5 Answers, 1 is accepted

Sort by
0
Andreas
Top achievements
Rank 1
answered on 19 Nov 2015, 08:17 AM

Ok - found it myself :)

 Then "Continue on Failure" option was what I was looking for

0
Ivaylo
Telerik team
answered on 23 Nov 2015, 08:42 AM
Hello Andreas,

Glad to hear you have found the option you were looking for.

I am closing this case.

Regards,
Ivaylo
Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
Andreas
Top achievements
Rank 1
answered on 24 Nov 2015, 09:51 AM

Unfortunately its not doing what I assume it should do ;-)

 I have a test with a login step, then some actions and finally a logout step. I marked the last logout step as "Continue on Failure". Then I changed an assertion in the middle to provoke a failure.

 When running this, the assertion fails and the execution stops, without the last step being executed.

 This means rerunning the tests fails, as it defines the loginstep as first action, but the page has never been logged out and therefore it fails finding the login form.

Do I need to do more to ensure that the last step is invoked, regardless what happened in previous steps ?

0
Andreas
Top achievements
Rank 1
answered on 26 Nov 2015, 01:39 PM

Ok I found out in the documentation that the button has a different meaning than I expected to have. The button is to add at a step and saying "continue if this step fails" - what I like to have is a kind a teardown mechanism for my test, meaning "what ever happened in the test, execute this step".

 I searched the forum and only found solutions via coding, but as people working with this tool will not be coders per se, is there any other way of defining this behaviour via the UI ?

0
Ivaylo
Telerik team
answered on 27 Nov 2015, 08:54 AM
Hello Аndreas,

Unfortunately you cannot define this using the UI, this would be only possible using a coded approach.

I have logged a feature request which you can track and follow using this URL.

Тhank you for your understanding.

Regards,
Ivaylo
Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
Asked by
Andreas
Top achievements
Rank 1
Answers by
Andreas
Top achievements
Rank 1
Ivaylo
Telerik team
Share this question
or