Execute a specific step when test fails

6 posts, 0 answers
  1. Andreas
    Andreas avatar
    10 posts
    Member since:
    Nov 2015

    Posted 18 Nov 2015 Link to this post

    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

  2. Andreas
    Andreas avatar
    10 posts
    Member since:
    Nov 2015

    Posted 19 Nov 2015 in reply to Andreas Link to this post

    Ok - found it myself :)

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

  3. Ivaylo
    Admin
    Ivaylo avatar
    750 posts

    Posted 23 Nov 2015 Link to this post

    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!
  4. Andreas
    Andreas avatar
    10 posts
    Member since:
    Nov 2015

    Posted 24 Nov 2015 in reply to Ivaylo Link to this post

    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 ?

  5. Andreas
    Andreas avatar
    10 posts
    Member since:
    Nov 2015

    Posted 26 Nov 2015 Link to this post

    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 ?

  6. Ivaylo
    Admin
    Ivaylo avatar
    750 posts

    Posted 27 Nov 2015 Link to this post

    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!
Back to Top