Forum Discussion
6 Replies
Sort By
- AlexKarasChampion Level 3
- dmitri_1Occasional ContributorYep it did.
But can you control exactly which tests run this under the KeywordTests folder?
Or will it just run after every test.
Because I would want different actions for each testcase... - jmcpeekContributorIt's an event, so it'll be fired every time. What you can do is have OnStopTest have the logic for what to do when it's called based on what test is stopping.
For example:
Sub GeneralEvents_OnStopTest(Sender)
if project.variables.currenttest = "test1" then
'do something
else
'do something else
end if
end sub - dmitri_1Occasional ContributorCan this be setup in a non-code view?
- AlexKarasChampion Level 3The project variable from Joe's sample can be assigned value using the Keyword operation, but the body of the event handler must be coded.
- dmitri_1Occasional ContributorAlright, sounds like a bit of a (unnecessary) complication as I was planning to primarily create tests using keywords and not viewing the code.