gpeeters
11 years agoOccasional Contributor
[Res]setPropertyValue
Dear support team,
I would like to put a times tamp into a REST post.
How can I do this in the most efficient way?
I did an attempt by first creating a property test step with a property <orderID>
In a groovy script I defined the following :
testRunner.testCase.getTestStepByName( "Properties" ).setPropertyValue("orderId", new Date())
However I get the following error :
groovy.lang.MissingMethodException: No signature of method: com.eviware.soapui.impl.wsdl.teststeps.WsdlPropertiesTestStep.setPropertyValue() is applicable for argument types: (java.lang.String, java.util.Date) values: [orderId, Fri Apr 18 15:38:34 CEST 2014] Possible solutions: setPropertyValue(java.lang.String, java.lang.String), getPropertyValue(java.lang.String) error at line: 7
What am I doing wrong here?
I am able to get the property value with the following command
def orderIdProp = testRunner.testCase.getTestStepByName( "Properties" ).getPropertyValue( "orderId" );
Kind regards,
Geert Peeters
I would like to put a times tamp into a REST post.
How can I do this in the most efficient way?
I did an attempt by first creating a property test step with a property <orderID>
In a groovy script I defined the following :
testRunner.testCase.getTestStepByName( "Properties" ).setPropertyValue("orderId", new Date())
However I get the following error :
groovy.lang.MissingMethodException: No signature of method: com.eviware.soapui.impl.wsdl.teststeps.WsdlPropertiesTestStep.setPropertyValue() is applicable for argument types: (java.lang.String, java.util.Date) values: [orderId, Fri Apr 18 15:38:34 CEST 2014] Possible solutions: setPropertyValue(java.lang.String, java.lang.String), getPropertyValue(java.lang.String) error at line: 7
What am I doing wrong here?
I am able to get the property value with the following command
def orderIdProp = testRunner.testCase.getTestStepByName( "Properties" ).getPropertyValue( "orderId" );
Kind regards,
Geert Peeters