cancel
Showing results for 
Search instead for 
Did you mean: 

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

Kanwar
Occasional Contributor

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.

 

Cheers!

kanwar

 

 

5 REPLIES 5
tphillips
Community Leader

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

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?


--------------------
QA Systems Architect
Kanwar
Occasional Contributor

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

@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.

 

Thanks!

 

tphillips
Community Leader

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

Oh, I see what you mean.

Probably best to use Append Log Folder and Pop Log Folder for your groups, so in the logs you can see which section of the test it was in.

 

For test scripting I would use their script counterparts, or maybe aqTestCase.Begin() and aqTestCase.End()


--------------------
QA Systems Architect
AlexKaras
Community Hero

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

Hi Kanwar,

 

What about creation of the required sequence in the Execution Plan and setting required value for the On Error option (https://support.smartbear.com/testcomplete/docs/working-with/managing-projects/execution-plan.html) ?

Does it help?

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
sonya_m
Community Manager

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

Thanks for helping, Alex and tphillips!

 

@Kanwar Please let us know if the suggestions helped!


Sonya Mihaljova
Community and Education Specialist

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors