Forum Discussion
Thank you Paul that was helpful ! Can you elaborate on what this statement does in your script assertion as commenting out this statement in assertion script gives me the same value as uncommenting this statement .. so trying to understand what it does
//testRunner.testCase.setPropertyValue( "MyProp", "[" + asString + "]" )
That line was to set a property value at the test case level with the list of names (enclosed in brackets so it would match a JSONpath expression).
I was using a Groovy script test step, but in a script assertion it would be slightly different because messageExchange is invoked
messageExchange.modelItem.testStep.testCase.setPropertyValue( "MyProp", "[" + asString + "]" )
I didn't mention that the next step for the JsonPath Match assertion would be like
JSONPath Expression = $..data.name
Expected Result = ${#TestCase#MyProp}
Related Content
- 9 years ago
- 8 years ago
- 5 years ago
Recent Discussions
- 7 days ago