Groovy Script Path Locations in SoapUI

What is the path to the data?  It’s 100% easier in Pro version – just Right-Click > Get Data!  But not likely in Free.

But there are other trick codes you can’t just find anywhere.1.  log.info the project name

log.info testRunner.testCase.testSuite.project.name

Why would I want to use this?  Because if you’re developing an XML for others to use – you may change your Project name to something like “TestAutomation_v23.0-1” – but some people lack the know-how to update SVN w/ Tortoise… or non-Tortoise users don’t go to the URL to get the latest version.

So I decided to create my own Oracle table that I update w/ the latest version:

CREATE TABLE soapui (
suite_name  varchar(32),
version_number  varchar(32)
);

Perform my initial

INSERT INTO soapui (suite_name, version_number) VALUES('TestAutomation','TestAutomation_v23.0-8');

From here I can do a simple IF statement against the “RunningVersion” & “The Oracle Version” Value.

I have a TOOLS Suite disabled that I have various actions I can do outside the Runner. One is to UPDATE the soapui table with the current version