Question

Hi StackExchange community,

I encountered the following issue: I am creating a plugin for SoapUI to preload some tasks. I am required to get some properties, which were defined as global properties.

In groovy, you get a global property as follows:

com.eviware.soapui.SoapUI.globalProperties.getPropertyValue( "remotePath" )

In my java plugin as follows:

TestProperty tp = com.eviware.soapui.SoapUI.getGlobalProperties().getProperty("remotePath");
        if (tp == null ) return "";
        return tp.getValue();

This is working for my local installation of SoapUI, but within Jenkins, only the first method is working.

Some infos: Local SoapUI Version: 4.6.1 Jenkins SoapUI Version: 4.5.1 Jenkins Version: 1.509.3 Maven Version: UnixMaven 3.0.4

I don't give POM information, I don't think it's necessary because it works if I access the global property inside a groovy script.

Was it helpful?

Solution

Found the "problem". It seems, that in jenkins the globalProperties are not available at the point where the plugin is loaded, but they are available when the testrunner starts and my beforeRun method triggers. This is not the same behaviour as local but I found a working solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top