Gordon_McNair
15 years agoContributor
Trying to change testStep Encoding porperty
One of our test analysts is trying to change the Encoding property in a testStep so he can loop through the same request with a number of different encodings.
In his attempts he has been unable to set the property.
He wrote some code to dump properties and the Encoding property did not show up in the list.
The code is:
There are a number of properties listed by the logging command but Encoding is not one of them.
Is there a way to access this property at runtime to support this approach?
Thanks,
Gordon.
In his attempts he has been unable to set the property.
He wrote some code to dump properties and the Encoding property did not show up in the list.
The code is:
def encoding = context.expand( '${DataSource#encoding}' )
def tempStep = testRunner.testCase.getTestStepByName("Create Form Session - REST");
tempStep.properties.each(){elemProperty ->
log.info(elemProperty.key)
if(elemProperty.key == 'Request'){
log.info(elemProperty.value)
}
}
There are a number of properties listed by the logging command but Encoding is not one of them.
Is there a way to access this property at runtime to support this approach?
Thanks,
Gordon.