Setup scripts and Tear Down Scripts

Initial Setup Script : soapUI initial setup is just a place holder/ an editor for writing your initial script before start your testing. This setup is available in two levels, TestSuite level and testCase level. The groovy script written in the TestSuite option will be the first one to trigger just before the execution of that testSuite. Same for testCase, the setup script written in the testCase level will be the first to trigger just before the execution of that particular test case. The main purpose of the Initial Setup section in soapUI is to provide the user the initial property creation, initialization, etc even before the test case execution.

TearDownScript : This is same as soapUI initial setup, the only difference is the code/ script written in this section will trigger only after the completion of testCase / testSuite depending upon where the script is written. The main purpose of this is to cleanup the automation suite like delete unwanted file, kill common objects , custom reporting etc. log, runner, context and testSuite variables are available in both setup and teardown scripts.