onStop event runs after every keyword
I wanted to know if there is a way for us to start the onStopTest event to be triggered after all the keywords in an execution plan is run. Currently with the below script, we are trying to check the last test item to achieve the same but wanted to see if there is an option to run the event only after the project has been executed and not for every keyword executed.
if (Project.TestItems.Current.Name == "Test1")
Log.SaveResultsAs(("File path", lsPackedHTML, true)
Log.Message("Mail was sent");
Log.Warning("Mail was not sent");
Thanks in advance!
Solved! Go to Solution.
Unfortunately, TestComplete does not provide an event like OnStopTestRun so far...
So either use your solution or just add one more Test Item as the last one in the execution tree.
/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.