Forum Discussion

M_McDonald's avatar
M_McDonald
Super Contributor
16 years ago

TestSuiteRunListener.beforeTestCase not run if only 1 test case executed

I have a project with script in TestSuiteRunListener.beforeTestCase event. If I use the TestRunner and select a single test case (even if there is only 1 test case in the test suite), the script is not executed. If I select , the script does get executed.

I am using build 3.0-pro-daily-build-2009-11-11-[3] and I have attached the test project.
  • Hi!

    well, from a strictly technical aspect, you are not executing a testsuite, so the corresponding testsuiterunlistener events are not triggered.. if you want them to be for a single testcase you would have to disable all the others in the testsuite and run the testsuite instead.. hmm.. how to workaround? what if you specify both the testsuite and testcase?

    regards!

    /Ole
    eviware.com
  • M_McDonald's avatar
    M_McDonald
    Super Contributor
    OK, I can see that this is by design and not a bug. I guess I was confused by having to specify the suite in the test runner.

    Thanks!