RUDOLF_BOTHMA
7 years agoCommunity Hero
Output a KeyWord Test name inside the OnStop event
I'm just looking for a simple way of being able to log when a KWT has been started when being called from another KWT rather tahn from the Project. As explanation:
function GeneralEvents_OnStartTest(Sender) { // this works if I'm running the project Log.Message("Start " + Project.TestItems.Current.Name); //sender is undefined if I ran the KWT myself e.g. a KWT calls another KWT //What I want to do is log every time a keyword test gets started e.g Log.Message("Start " + [The KWT that just started]); }
I just need a way inside here to find out what KWT just started. Same goes for stop event as well I guess. Any thoughts/insights ?
I just put a line at the top of each test where the name of the test is pushed to the log, then at the end of every test I do the matching pop. That gives me a nicely laid out log and you can see the nested calls.
If you care about seeing what test is running on the screen, you can push/pop to the indicator too.