Ask a Question

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..

Showing results for 
Search instead for 
Did you mean: