testing - How to practice with Xpath Match Assertion in SoapUI? -
i have tested contains assertion without issues don't know how validate webservices using xpath match assertion in soapui.
can please tell me how workout 'xpath match' assertion in soapui?
i'm using json requests.
updated: please find attachments
1) json response 2) assertion error message
please tell me how validate identifier , please provide correct xpath expression , expected results
thanks in advance!
in xpath expression field need insert xpath expression =) , in expected result field need insert expected result of applying xpath expression response of request.
for example, if response contains this: [ { "id": "112", "username": "user1", }, { "id": "233", "username": "user2", } ]
and want verify, response contains user id = 112, need add in xpath expression //id[text() = '112'] , in expected result - 112
in soap ui pro can use graphic wizard creating xpath match assertion.
about xpath basics can read here: http://www.w3schools.com/xpath/
Comments
Post a Comment