I have a SoapUI project, and an external custom Java library of utility methods that I've written for using in Groovy scripts.
In the Java library, I have a particular utility class, com.custom.acmeproject.ContextProperties, that has utility methods for changing the values of properties in the context of groovy scripts. Using this class, I can do the following in a groovy script file:
import com.custom.acmeproject.ContextProperties;
ContextProperties.increment(context, "messageId");
However, I'd like to be able to write that script without the import statement. Is there a way I can setup my SoapUI project to automatically import this class into all of my Groovy scripts?
I would prefer to be able to do this just for this one SoapUI project, without affecting other SoapUI projects; however, if this is not possible, I'll take a solution that will affect all my projects.
Because this SoapUI project is automated using a maven build run in
Jenkins, I need this solution to work both for running the tests in
the SoapUI IDE (I'm using SoapUI NG Pro), and for running the tests
using thesoapui-pro-maven-plugin.Preferably, any solution should also work without having to
manually configure Groovy settings outside of SoapUI across multiple environments.
Is what I want to do possible?