Forum Discussion

Kanwar's avatar
Occasional Contributor
4 years ago

How to group the operations in Keyword test and if one fails in the group, then fail the keyword tst

Hi, I'm looking for the options to group the keyword operations. And if one of the keyword operations fails in the group, then capture the error and stop the keyword test. Below is the example


Is this option available in TestComplete?

- Group (Keyword operation 1, Keyword operation 2, Keyword operation 3)

If one of keyword operations fails, then capture the error and stop the keyword test.






5 Replies

  • tphillips's avatar
    Frequent Contributor

    You can set the keyword test's "On error" value in the execution plan to be "Stop Current Item"

    That way any keyword operation that fails will fail the test. It won't matter about groups

    Or are you wanting something different?

    • Kanwar's avatar
      Occasional Contributor

      tphillips Thanks for your response. I have already know this approach. But my requirement is different, have described below..

      I want to define more than one group in the keyword test and want to capture the errors against these groups to easily identify which group has failed. for instance

      Group 1 - Login

      - Operation 1

      - Operation 2

      Group 2 - Navigate to particular screen

      - Operation 1

      - Operation 2


      If operation 2 fails in group 1, then stop the current test and capture the error against the particular group i.e. Login process has failed. Hope this makes sense.




    • sonya_m's avatar
      SmartBear Alumni (Retired)

      Thanks for helping, Alex and tphillips!


      Kanwar Please let us know if the suggestions helped!