Forum Discussion
dmltn84
13 years agoOccasional Contributor
Hello,
I am using this code for groovy script based on your instructions
xxx - is a test step with request containing value which should be incremented
Output is as follows:
I expanded script to look as follows, but it runs only once:
Test steps are arranged in the following order:
1. Properties(1)
2. xxx
3. groovy script
Can you please advise what should be corrected?
I am using this code for groovy script based on your instructions
def incrementValue = context.expand( '${Properties#incrementValue}' );
incrementValue = incrementValue.toInteger() + 1;
if (incrementValue <= 10) {
testRunner.testCase.setPropertyValue("IncrementValue", incrementValue);
log.info "IncrementValue: " + incrementValue;
testRunner.gotoStepByName("xxx");
}
xxx - is a test step with request containing value which should be incremented
Output is as follows:
groovy.lang.MissingMethodException: No signature of method: com.eviware.soapui.impl.wsdl.WsdlTestCasePro.setPropertyValue() is applicable for argument types: (java.lang.String, java.lang.Integer) values: [incrementValue, 2] Possible solutions: setPropertyValue(java.lang.String, java.lang.String), getPropertyValue(java.lang.String) No signature of method: com.eviware.soapui.impl.wsdl.WsdlTestCasePro.setPropertyValue() is applicable for argument types: (java.lang.String, java.lang.Integer) values: [incrementValue, 2] Possible solutions: setPropertyValue(java.lang.String, java.lang.String), getPropertyValue(java.lang.String)
I expanded script to look as follows, but it runs only once:
def incrementValue = context.expand( '${Properties#incrementValue}' );
incrementValue = incrementValue.toInteger() + 1;
incrementValue = incrementValue.toString();
if (incrementValue <= 10) {
testRunner.testCase.setPropertyValue("incrementValue", incrementValue);
log.info "incrementValue: " + incrementValue;
testRunner.gotoStepByName("xxx");
}
Test steps are arranged in the following order:
1. Properties(1)
2. xxx
3. groovy script
Can you please advise what should be corrected?
Related Content
Recent Discussions
- 8 days agoshand2i