cancel
Showing results for 
Search instead for 
Did you mean: 

How to determine that test was interrupted?

SOLVED
Highlighted
Occasional Contributor

How to determine that test was interrupted?

Hello community!

 

I need to get value "test interrupted" or "test completed" when OnStopTest event is triggered.

I try to get it from log message "The test execution was interrupted.", but sometimes message appears after OnStopTest event is ended.

OnLogError event does not triggered after OnStopTest event.

To add mark at the end of each test not conveniently.

Anybody knows another solution?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Manager

Sure @BVS ! Thank you for updating us. 

Let me post a temporary solution to this thread that our support engineers provided you with.

 

First, they suggest that you create a feature request for adding the «Interrupted» property to the Log object.

 

And, here's one more suggestion from them:

 

>>

Also, here is another idea that you can try: save a log to a text file and write a custom script to find the needed "The test execution was interrupted" string in the whole log. Here is the article where you can find more information about the Log object: https://support.smartbear.com/testcomplete/docs/reference/project-objects/test-log/log/index.html.

<<

 

Edit: If you are interested in the implementation of this feature, please upvote - Adding the «Interrupted» property to the Log object 


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

View solution in original post

9 REPLIES 9
Highlighted
Community Hero

Hi,

 

Technically, to add some mark at the end of each test is the only solution that I can think of at the moment.

However, IIRIC, interrupted test is marked red, as the failed one (which, technically, is the same).

Can you describe your use case that requires to distinguish between interrupted and failed 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
================================
Highlighted
Occasional Contributor

Hi @AlexKaras 

 

I automatically transfer test result in test management system by API when OnStopTest event is triggered.

Currently when I interrupting Keyword test it continues to stay green. It is wrong information for test management system and I do not need to transfer it. Test will marked red only after OnStopTest event is ended. But after that is no way automatically transfer result to test management system.

Community Hero

Hi,

 

Hm... Well, I see...

 

I never checked it, but if you don't mind:

-- This  "The test execution was interrupted." message - is it of Error type?

-- If it is, then I would expect it to trigger the OnLogError event;

-- I would expect that this OnLogError event is triggered before the OnStopTest one.

If all above expectations are correct, then you can utilize the OnLogError event to set a flag that the test is interrupted and use this flag in the OnStopTest event handler to make a decision of whether or not the test was interrupted. OnStartTest event can be used to reset the flag.

 

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
================================
Highlighted
Occasional Contributor

Hi, @AlexKaras 

 

-- This "The test execution was interrupted." message - is it of Error type? - Yes it is.

-- If it is, then I would expect it to trigger the OnLogError event; - I would expect it too, but OnLogError is not triggered by this message. Don't know why. Maybe it works asynchronous.

-- I would expect that this OnLogError event is triggered before the OnStopTest one. - Often message appears after OnStopTest event is finished.

If all above expectations are correct, then you can utilize the OnLogError event to set a flag that the test is interrupted and use this flag in the OnStopTest event handler to make a decision of whether or not the test was interrupted. OnStartTest event can be used to reset the flag. - Unfortunately, this does not work.

Highlighted
Community Hero

Hi,

 

Wierd.

I would recommend to open a Support Case via the https://support.smartbear.com/message/?prod=TestComplete form and reference this thread.

I also will appreciate it if you update this thread with the answer from Support.

 

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
================================
Highlighted
Community Manager

Thank you for looking into this Alex!

 

@BVS I wasn't able to find a support ticket from you. Did you solve this issue? Please share your progress with us!

If you didn't solve this yet, this might indeed require deeper investigation from the support team.


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
Highlighted
Occasional Contributor

Hi @sonya_m .

I opened support Case # 00443874. But now I so busy. I plan to resume conversation soon.

Thanks for the support!

Highlighted
Community Manager

Sure @BVS ! Thank you for updating us. 

Let me post a temporary solution to this thread that our support engineers provided you with.

 

First, they suggest that you create a feature request for adding the «Interrupted» property to the Log object.

 

And, here's one more suggestion from them:

 

>>

Also, here is another idea that you can try: save a log to a text file and write a custom script to find the needed "The test execution was interrupted" string in the whole log. Here is the article where you can find more information about the Log object: https://support.smartbear.com/testcomplete/docs/reference/project-objects/test-log/log/index.html.

<<

 

Edit: If you are interested in the implementation of this feature, please upvote - Adding the «Interrupted» property to the Log object 


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

View solution in original post

Highlighted
Occasional Contributor

Thank you. New future request was created.

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

Get properties of a web page element

See replies!

Compare images using the Region Checkpoint

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