Forum Discussion

shrik18's avatar
shrik18
Occasional Contributor
8 years ago

Run project setup script from testsuite setup & teardown script/ setup & teardown script chaining

Hi, 

Is there a way I can get the setup/teardown script of project to run from testsuite setup/teardown script and implement same for testcase. 

I have same setup/teardown script for all levels. If I add setup script for every level testcase, testsuite and project and run it from project, it runs setup script 3 times which is redundant. I want to write setup/teardown scripts for project and chain them for lower levels by referencing/running the project setup script in testsuite/testcase setup script. So irrespective of what level I run , the setup/ teardown script runs only once  

  • nmrao's avatar
    nmrao
    Champion Level 3
    May be you can re-use them if you place the Script Library provided the if it is the same script and want to reduce the code maintenance.

    If your objective is different ( irrespective of what level I run , the setup/ teardown script runs only once), then you need see if there is any relevant in Events feature. I am not sure if it is possible for user to have a custom one. Better check with SmartBear support team regarding the same.