How to determine that test was interrupted?
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
Solved! Go to Solution.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
/Alex [Community Champion]
____
[Community Champions] 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 Champions]
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 Champion] signature is assigned on quarterly basis and is used with permission by SmartBear Software.
https://community.smartbear.com/t5/Community-Champions/About-the-Community-Champions-Program/gpm-p/252662
================================
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
/Alex [Community Champion]
____
[Community Champions] 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 Champions]
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 Champion] signature is assigned on quarterly basis and is used with permission by SmartBear Software.
https://community.smartbear.com/t5/Community-Champions/About-the-Community-Champions-Program/gpm-p/252662
================================
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
/Alex [Community Champion]
____
[Community Champions] 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 Champions]
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 Champion] signature is assigned on quarterly basis and is used with permission by SmartBear Software.
https://community.smartbear.com/t5/Community-Champions/About-the-Community-Champions-Program/gpm-p/252662
================================
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @sonya_m .
I opened support Case # 00443874. But now I so busy. I plan to resume conversation soon.
Thanks for the support!
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
