Advertisement
manojfdo

Untitled

Mar 4th, 2018
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Groovy 0.43 KB | None | 0 0
  1. // JSON Parsing the Response
  2. import groovy.json.JsonSlurper;
  3. def jsonBody = new JsonSlurper().parseText(messageExchange.response.getContentAsString());
  4. def recivedCustomerOrderRef = jsonBody.customerOrderRef;
  5.  
  6. // getting the test suite property
  7. def sentCustomerOrderRef = messageExchange.modelItem.testStep.testCase.testSuite.getPropertyValue("customerOrderRef");
  8.  
  9. // asserting
  10. assert sentCustomerOrderRef == recivedCustomerOrderRef;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement