get name of current test in log.error event
I cannot use Project.TestItems.Current to get the currently running test name because it is returning null in the Log.Error event. Is there a way to get the test name in code? Thanks
Solved! Go to Solution.
Project.TestItems.Current is the actual test item itself. Replace with Project.TestItems.Current.Name and see if that gets you what you need.
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
Why automate? I do automated testing because there's only so much a human being can do and remain healthy. Sleep is a requirement. So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.
Mysterious Gremlin Master
Vegas Thrill Rider
Are you running from the project level with test items added to it? Sounds like you might running an individual keyword test or script function.
Click the Accept as Solution button if my answer has helped