Have you ever wanted to run some features that are only available in SOAP UI Pro?
Well, a little grasp of Groovy scripting can help you to simulate some of those high-falutin features
that would have cost you $$$ per year in licenses. Here is one neat feature that I really like.
Running All Projects in a Workspace
This feature is not available in the free (community version) of SOAP UI, but the Groovy script
described in this post will do the same thing, without hurting your wallet.
Here are the steps for using the project file in SOAP UI
- Open or create a new Workspace in SOAP UI
- Add/import all the projects you want to run into the workspace
- Import the test harness SOAP UI project. You can download the project file from > here <
- Remove any projects that are to be excluded
- Expand the “ExecutionHarnessExample” project and run the only TestStep – Groovy script “RunProject”
The script will loop through all the test Projects, TestSuites, TestCases and TestSteps, while also printing a summary of the progress to screen, and where indicated, logging the complete test logs to a file. The script prompts the user for the path to the log file. Accepting the default value “DO-NOT-LOG”, turns off logging.
Enter a valid path to enable logging. The name of the log file is saved to a global property, so it is available even after the test run (in case you forget)
A useful feature of the script is that assertions are exercised, so you can see TestSteps turning green or red as they are being run!
The script is quite simple, and you can open it in SOAP UI for a detailed walk-through, but below are the salient things:
At the end of the test run, you can view the log file in a text editor like TextPad and view the messages exchanged (including headers) as well as timings.
And that’s all folks; I hope you found the posting useful.
It has certainly helped me put off the purchase of a SOAP UI licence for another day 🙂