Forum Discussion

mayur_vats's avatar
mayur_vats
Occasional Contributor
5 years ago

Project teardown script executes only when tests are executed from project test runner

Hi I am trying to run certain scripts in project's tear down section to generate a custom result file. To start with I found out that project teardown scripts will execute only when we launch the scr...
  • richie's avatar
    5 years ago
    Hey mayur_vats

    Yep...the behaviour you mention is as its required to be....or at least its the same behaviour ive noticed in readyapi!

    You could add ylteardown scripts to your testsuites and testcases if you need the scripts to execute for individual tests or testsuites but im guessing youll need to alter the slightly.

    You might be able to add a groovy snippet (final step or script assertion or a teardown) in each of tge testcases to actually call the project teardown script, although i dunno how to do that and even if its easy, it seems really rubbish and inefficient to bother.....youd have to update ebery single test

    Rich
  • mayur_vats's avatar
    mayur_vats
    5 years ago

    Thank you for your response. I have recently started and was quite confused with the behaviour of the execution. Thank you for confirming that this is the standard behaviour.