Forum Discussion

jklapste's avatar
jklapste
Contributor
14 years ago

TestRunListener.beforeRun triggers during Run TestCase

Seems like incorrect behavior to have the TestRunListener.beforeRun event trigger both when a TestCase is being run AND whenever a Run TestCase TestStep is called.

I'm currently using the event to initialize several project variables to default values for use by the TestCase which in some TestCases I override but when a Run TestCase TestStep executes it then resets them back to the default values.

Happens in 4.5.0

1 Reply

  • Hi,

    I think that this behavior is correct, judging by the documentation here.
    TestRunListener : events related to running tests at the TestCase level


    So it does make sense that every TestCase that runs triggers this event.

    Regards

    Henrik
    SmartBear Software