Forum Discussion

MaksimSuperfin's avatar
MaksimSuperfin
New Contributor
7 years ago

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/42234 an 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 class com.eviware.soapui.impl.wsdl.teststeps.assertions.support.AssertionEntry.

 

Please, help me find how to set "path" and "expectedContent" into xpath AssertionEntry dynamically.

 

Thank you, Maksim

No RepliesBe the first to reply