Ask a Question

LoadTest - setup script - set properties

SOLVED
Suncrusher
New Contributor

LoadTest - setup script - set properties

Hi,

 

I want to initialize a JSON database with some dynamic values before the load test really starts.

 

When accessing the properties I can't read the values. Here is what I have so far:

 

 

for (String key : loadTestRunner.getLoadTest().getTestCase().properties.keySet()) {
 	log.info("propertiesMap key: " + key);
 	log.info("Value: " +loadTestRunner.getLoadTest().getTestCase().properties[key]);
 }

 

 

This results in this output:

 

 

Tue Sep 28 15:39:00 CEST 2021: INFO: propertiesMap value: currentRow
Tue Sep 28 15:39:00 CEST 2021: INFO: Value: com.eviware.soapui.impl.wsdl.support.XmlBeansPropertiesTestPropertyHolder$UserSpecificPropertiesStepProperty@59c91ae5

 

 

What is this com.eviware.soapui.impl.wsdl.support.XmlBeansPropertiesTestPropertyHolder$UserSpecificPropertiesStepProperty?

How to get the value out of it?

 

1 ACCEPTED SOLUTION

Accepted Solutions
Suncrusher
New Contributor

Re: LoadTest - setup script - set properties

Seems that this value can only be read but not changed. Via this code I could extract the value:

 

 def project = loadTestRunner.getLoadTest().getTestCase().getTestSuite().getProject();
 log.info("loadTestRunner - loadTest: " + loadTestRunner.getLoadTest().getTestCase().getLabel());
 for (String key : loadTestRunner.getLoadTest().getTestCase().properties.keySet()) {
 	log.info("propertiesMap value: " + key);
 	log.info("Value: " +loadTestRunner.getLoadTest().getTestCase().properties[key]);
 	def prop = loadTestRunner.getLoadTest().getTestCase().properties[key];
 	log.info("internal value: " + prop.getProperties()["value"]);
 }

 

Here is a 10 years old version of this class: https://github.com/oysteing/soapui/blob/master/src/java/com/eviware/soapui/impl/wsdl/support/XmlBean...

View solution in original post

1 REPLY 1
Suncrusher
New Contributor

Re: LoadTest - setup script - set properties

Seems that this value can only be read but not changed. Via this code I could extract the value:

 

 def project = loadTestRunner.getLoadTest().getTestCase().getTestSuite().getProject();
 log.info("loadTestRunner - loadTest: " + loadTestRunner.getLoadTest().getTestCase().getLabel());
 for (String key : loadTestRunner.getLoadTest().getTestCase().properties.keySet()) {
 	log.info("propertiesMap value: " + key);
 	log.info("Value: " +loadTestRunner.getLoadTest().getTestCase().properties[key]);
 	def prop = loadTestRunner.getLoadTest().getTestCase().properties[key];
 	log.info("internal value: " + prop.getProperties()["value"]);
 }

 

Here is a 10 years old version of this class: https://github.com/oysteing/soapui/blob/master/src/java/com/eviware/soapui/impl/wsdl/support/XmlBean...

View solution in original post

cancel
Showing results for 
Search instead for 
Did you mean: