Assertion for a test step is not being recognized by groovy script when run on Jenkins

Viewed 66

I have a "Property Content" JsonPath Existence Match assertion for a Test Step in a test case. Its a REST service and have assertion as following:

$.recommendedFood[0].calories

I have the following code def assertsize = testStep.getAssertionList().size()

This works fine when i print out running the groovy script on SOAP UI ( locally)log.info (testStep.getAssertionList().size()) output is 1

But the same when run on Jenkins, the size is printed as 0( no change in the script, but it doesnt recognize the test step.

Also i see error 23:41:42,500 ERROR [TestAssertionRegistry] Missing assertion for type [JsonPath Existence Match]

I tried solutions : SoapUI Testrunner giving error about TestAssertionRegistry

https://community.smartbear.com/t5/API-Functional-Security-Testing/Maven-Soapui-Plugin-with-json-assertions-does-not-work-well-in/td-p/106777

but could not solve the issue. Any solutions or fixes for that?

0 Answers
Related