cancel
Showing results for 
Search instead for 
Did you mean: 

Work flow handling

SOLVED
New Contributor

Work flow handling

Hi all,

 

I have a scenario as below:

TestSuite: Account information:

- test item1: Create an Account

- test item2: Login with the Account has just created

- test item3: Update account information

 

When I run TestSuite, is there any way to check if test item1 is passed on the main flow (some checkpoint failed is ok, just make sure the script can create an Account successfully) Test Complete will run test items 2 and 3?

and if test item 1 failed (script can not create an Account successfully) Test Complete will stop immediately without running test items 2 and 3.

 

Thanks in advance.

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Community Leader

Re: Work flow handling

Highlighted
Community Hero

Re: Work flow handling

Hi,

 

Generally speaking, TestComplete lacks the functionality that you are talking about despite the ages-old feature request and topics like yours asked here from time to time.

 

The good news is that considering your exact example, some possible options can be suggested:

a) Consider the Runner.Stop() method. If you make second test item to be a child of the first one and the third test item to be a child of the second one, then Runner.Stop(true) call will stop execution of the current test item and all its children will be skipped as well;

b) Consider the On Error and On Exception properties of Test Item. Stop Current Item setting will prevent execution of child items as well;

c) You may consider to implement a set of runtime flags (as a Project Variable of temporary type), use them as indicators and process these indicators on start of every test item to make a decision if the given test item should be executed or skipped.

 

P.S. My personal preference is to keep (key) data from the previous successful test item's execution and use them if current execution of the parent test item fails.

Considering your example: essentially, you are verifying three things - a) that account can be created; b) that you can log in using created account; c) that current account's information can be updated.

Assuming that the previous tests execution was successful, account's login (and supplementary information) will be preserved.

Now let's assume that account's creation functionality is broken. First test item will fail and you will be notified about this problem. Preserved account's information will not be altered, so the second test item will be able to use the login information from the previous test run and check that logging-in is still possible. And so on.

* This approach makes it possible for your tests to provide as much information about the current tested product state as possible, but not just fail miserably on first problem without letting you know the state of other functionality of the product under the test. *

 

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
================================

View solution in original post

5 REPLIES 5
Highlighted
Community Leader

Re: Work flow handling

Highlighted
Community Hero

Re: Work flow handling

Hi,

 

Generally speaking, TestComplete lacks the functionality that you are talking about despite the ages-old feature request and topics like yours asked here from time to time.

 

The good news is that considering your exact example, some possible options can be suggested:

a) Consider the Runner.Stop() method. If you make second test item to be a child of the first one and the third test item to be a child of the second one, then Runner.Stop(true) call will stop execution of the current test item and all its children will be skipped as well;

b) Consider the On Error and On Exception properties of Test Item. Stop Current Item setting will prevent execution of child items as well;

c) You may consider to implement a set of runtime flags (as a Project Variable of temporary type), use them as indicators and process these indicators on start of every test item to make a decision if the given test item should be executed or skipped.

 

P.S. My personal preference is to keep (key) data from the previous successful test item's execution and use them if current execution of the parent test item fails.

Considering your example: essentially, you are verifying three things - a) that account can be created; b) that you can log in using created account; c) that current account's information can be updated.

Assuming that the previous tests execution was successful, account's login (and supplementary information) will be preserved.

Now let's assume that account's creation functionality is broken. First test item will fail and you will be notified about this problem. Preserved account's information will not be altered, so the second test item will be able to use the login information from the previous test run and check that logging-in is still possible. And so on.

* This approach makes it possible for your tests to provide as much information about the current tested product state as possible, but not just fail miserably on first problem without letting you know the state of other functionality of the product under the test. *

 

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
================================

View solution in original post

Highlighted
New Contributor

Re: Work flow handling

So appreciated Alex, I'm following your guidelines.

Highlighted
New Contributor

Re: Work flow handling

Thanks a lot, I'll take a look on these topics.

Highlighted
Community Manager

Re: Work flow handling

Thank you so much, Community!

 

@phatlen1 Please let us know whether the advice helped! If it did, we would appreciate it if you marked the best answer as a Solution here. Thank you🙂


Sonya Mihaljova
Community and Education Specialist

Learn SmartBear products in a fun and easy way and prove your knowledge!
>>Participate in the TechCorner Challenge today
New Here?
Join us and watch the welcome video:
Announcements
Join TechCorner Challenge!
Want a fun and easy way to learn TestComplete? Try solving weekly TechCorner challenges and get into the Leaderboard!


Challenge Status

Compare images using the Region Checkpoint

See replies!

Converting UTC TimeDate in an Excel file

See replies!

Compare HTML table with Excel file and correct data in Excel file

Participate!

How to execute remote test and obtain results via Test Runner REST API

Participate!
Top Kudoed Authors