Ask a Question

Smart Assertion

SOLVED
aeswaramoorthy
New Contributor

Smart Assertion

Trying to set Smart Assertion for my REST api, do we need to main the order/position of the output we received.

Say when we run first time to set smart asserion output values will be one order for next run the output values will be another order . but the field we set for assertion will be present in some position will the assertion still pass or as the position is incorrect when compared to the first result it will fail the assertion

3 REPLIES 3
richie
Community Hero

Hey @aeswaramoorthy,

Is this json or xml?

Im guessing that smart assertions use xpath/jsonpath.

So, if the xpath/jsonpath remains consistent across multiple executions then the smart assertions would work fine.

This is a guess on my part though, so id give it a shot to double check

Nice one

Rich
if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta

Thanks @richie

Its a XML output/response. i too guess its expecting the exact position.

As you said if its use xpath then always position is expected else it wont work.

 

Xpath has to be updated not use position and yet identify uniquely.


Regards,
Rao.
cancel
Showing results for 
Search instead for 
Did you mean: