Forum Discussion

alibaba82's avatar
alibaba82
Super Contributor
17 years ago

conditional assertion ?

Hello,
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.
Thanks

Ali

1 Reply

  • omatzura's avatar
    omatzura
    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..

    /Ole
    eviware.com