Forum Discussion
nisgupta
Valued Contributor
Thanks for the updates
This is what I am doing. invoking onlogerror when there is error in testItem. Then in onStpTest Events trigger the email . But which testlog we have to attach ?
NG
LinoTadros
5 years agoCommunity Hero
in the event itself, you can figure out which TestItem caused the event to happen
Log.Message(Project.TestItems.Current.Name);
Cheers
Lino
- nisgupta5 years agoValued Contributor
Thanks for the updates . Yes we can use Log.Message(Project.TestItems.Current.Name);
to retrive the current TestItem. But how can we get the Test log for this current TestItem ?
- LinoTadros5 years agoCommunity HeroYou can’t
That is not how Test Logs work in TestComplete. They happen at the end of the entire test and there is no way to log only a specific test item result
You can use Log.SaveResultAs(...) on a specific function but that will report all previous tests as well before the call was issued
In conclusion, you can’t do what you are looking for unless you implement events and create your own report file away from the built in Test Log in TestComplete
Might be a good suggestion for future releases
Cheers
Lino