1

I'd like to execute a script to setup tests. It should be run once but only once if I start a single test manually or a testsuite or the whole project. (Whenever the execution starts.) I also need to handle the opposite event after all tests are over. I'm looking to somthing similar as the "[AssemblyInitialize]-Method" in .NET-unit tests. How can this be done?

1

SoapUI allows you define start-up and tear-down scripts for both test suites and tests withing a suite.

If you select either a a test suite or test in the GUI, you'll see tabs near the bottom of the screen. Select either Setup Script or TearDown Script and type your Groovy script in there.

0

In my opinion, you got 3 solutions:

  1. first is to edit directly testruner.sh/.bat, remember it will affect as well other projects.

  2. I'm not sure what you are trying to achieve, but at first glance, it seems you wish to pass login data (or something like that). If I'm right you may try soapUI's authorize options or "transfer step" to pass some data to other testcases.

  3. option: it's rather easy, but won't looks good. Reorganize test suits/test cases, in each test case add a groovy script (with a condition to not run the script if the process is already running), and on the last step add once

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.