Contributions
Update "path" and "expectedContent" of AssertionEntry dynamically
Hi! I'm using Ready! API 2.0.0 (SoapUI NG PRO) Here https://community.smartbear.com/t5/SoapUI-Pro/Resolved-Add-Assertions-to-TestStep-in-Groovy/td-p/37082 I can see that "path" and "expectedContent" of xpath assertion can be updated using groovy for REST test steps (and we use that logic in our project). Currently we want to have options to clone assertions from REST test steps to Assertion test steps. I found here https://community.smartbear.com/t5/SoapUI-Pro/Res-addAssertion-method-returns-null-for-AssertionTestStep/td-p/42234an example that shows how to add assertion on AssertionTestStep and it works but assertions body is empty (without "path" and "expectedContent"). I couldn't find in a documentation https://www.soapui.org/apidocs/pro/ how to update "path" and "expectedContent" of entity representing classcom.eviware.soapui.impl.wsdl.teststeps.assertions.support.AssertionEntry. Please, help me find how to set "path" and "expectedContent" into xpath AssertionEntry dynamically. Thank you, Maksim7 years agoPlace ReadyAPI QuestionsReadyAPI Questions627Views0likes0CommentsBest practice for support both XML and JSON tests
Hi! We have web service that returns data in JSON and XML formats. To get response in XML format user need to add header "Accept" with value "application/xml" into request (it is supported by our server). Can you please advice best practice from the point of SoapUI test project how to support checking results of both formates and avoid test duplication? Currently we have tests in JSON. We run groovy script util that transform JSON test case into XML test case. So we have 2 tests (one tocheck JSON and one to check XML format) that doesn't look for us efficient and we want to do something like this: "...to have some kind of listener with global parameter which can switch between json or xml and by that to remove the need of tests duplication for xml support i.e in case isXML global parameter is true we'll have a listener which will validate all the responses return with xml content header and then parse the response to json format" Is it possible? I am not sure how to apply all existed JSON assertions of response after transformation of XML response into JSON response. Do we have any chance to avoid support of test duplication? Thank you, Maksim748Views0likes0Comments