Forum Discussion

jklapste's avatar
jklapste
Contributor
13 years ago

Execute events

It would be nice if you could execute scripts tied to events such as TestRunListener.beforeRun the same way you can execute TestCase Setup Scripts or Script Assertions or Groovy Script TestSteps
  • TestCase Setup Scripts have a little green right pointing arrow, 'Runs this script' that you can click on that then executes that script even though you are not running the TestCase.

    It would be nice if that same 'Runs this script' functionality existed for the different event scripts, such as the TestRunListener.beforeRun, or the Script Assertions or Groovy Script TestSteps.

    In somes cases, such as the events, you might have some initialization stuff (like my beforeRun sets up a bunch of global properties). Runs this script allows me to both test my code works as expected in addition to running arbitrarily. Adding it to Script Assertions and Groovy Script TestSteps allows me to test the code as I'm writing it.
  • Hello,

    Yes, initially that was idea but many things do not exists or we place mocks when you pres on run script button. In those cases we think there is no
    appropriate mock. But anyway we are taking this in consideration.

    robert
    /Smartbear