Showing results for 
Search instead for 
Did you mean: 

conditional assertion ?

Super Contributor

conditional assertion ?

is it possible to have something like a conditional assertion in soapUI. for instance I have function called DeleteGrid() which return a 'Success' if the grid was deleted and a 'Failure' if it was not deleted. I also have a function CreateGrid which has a field 'mandatory'. DeleteGrid behavior is tied to mandatory = true/false.

In my datadriven test I first call creategrid with mandatory = true and then with false. So in my assertion for deleteGrid, I would want some thing like

'Success' only if mandatory = true in createGrid

Is this possible to do ?

hopefully that made sense.

Super Contributor

Hi Ali!

hmm.. is the value of the mandatory field in your CreateGrid request part of the data provided by the DataSource (in which case you could maybe also include the DeleteGrid result as a DataSource property and check against it with a standard xpath-contains assertion against a property-reference)?

Alternatively you could create a Script Assertion that can check the CreateGrid request and assert accordingly..

New Here?
Join us and watch the welcome video:
TechCorner Leaderboard
Want a fun and easy way to learn ReadyAPI and show off your skills? Try solving weekly TechCorner challenges and get into the Leaderboard!

Challenge Status

Get a full Raw JMS request


Compare an expected JSON value and actual response in Events


Fetch value/data from JSON response using Groovy Script

See replies!

Get data from Petstore and add it to Excel sheets

Top Kudoed Authors