ContributionsMost RecentMost LikesSolutionsRe: I want the data/ values comparison of a xml-file on my system with xml response of a rest API call? Hi Rao- Thanks for your response, appreciated. Here is the detail which may help you to understand. I’m trying to compare the whole XML file from my hard drive with the XML response of a rest API call. I want to know how to get this done step by step in Ready API. If there is a groovy script, then what values need to be changed to what in the groovy script to perform this comparison. The XML file is on Hard drive Run the API call (using get method) in Ready API (XML) Response generates in Ready API, and it looks exactly as the file I'm comparing with but obviously it's not a file. Now I want to see the difference between the file and the response generated in this API call. Now, we probably need to add a step after in the test to do this comparison. Do I have to have a groovy script to achieve this or is there another way? If it has to be a groovy script, then where is the script I can find? I don’t know what values and how to change them in groovy? As per your instruction, I googled it. The following is one of a result import org.custommonkey.xmlunit.*; import org.xml.sax.SAXException; // Get XML documents def request = context.expand( '${Request 1#Response}' ) def response = context.expand( '${Request 2#Response}' ) // Creates a list of elements to ignore Set<String> ignoreList = new HashSet<String>(); ignoreList.add("dateTime") ignoreList.add("packageId") // Create an object with differences between documents Diff myDiff = new Diff(request, response) DetailedDiff diff = new DetailedDiff(myDiff); // Get a list of all differences List allDifferences = diff.getAllDifferences(); // Loop through all differences and find their node names for (int i = 0; i < allDifferences.size(); i++) { diffNodeName ="" // Check the node type to get the right node name nodeType = allDifferences.get(i).getTestNodeDetail().getNode().getNodeType() if (nodeType == 1) { // Get the name of the node if the difference is in the comment diffNodeName = allDifferences.get(i).getTestNodeDetail().getNode().getNodeName() } else { // Get the name of the parent node if the difference is not in the comment diffNodeName = allDifferences.get(i).getControlNodeDetail().getNode().getParentNode().getNodeName() } // Make sure that the node with a difference is not on the list of nodes to ignore if (!ignoreList.contains(diffNodeName)) { // Fail assertion assert false } } assert true Now the challenge is, I'm not a groovy expert nor I'm a programmer. Now I need to help someone to let me know how to use the above in detail Thanks, Ray I want the data/ values comparison of a xml-file on my system with xml response of a rest API call? In Ready API, I want to perform data/ values comparison of a xml-file on my system with xml response of a rest API call? Can someone help or knows how to resolve the issue step by step? Thanks. Re: Getting a 406 Status code in Ready API 2.2.0 ver, while it works completely fine in Rest client Hi Nastya, Thanks for taking the time and helping me out. Appreciated!! So I followed your instructions and made those changes in the tool preferences, but unfortunately I still see the same results. FYI- the screen shot is attached. Thanks. Re: Getting a 406 Status code in Ready API 2.2.0 ver, while it works completely fine in Rest client I followed your instruction and still the same results. Attaching a screen shot for your review and see if that can help you to see what I'm facing. Thanks, Re: Getting a 406 Status code in Ready API 2.2.0 ver, while it works completely fine in Rest client I compared the RAW Request in both, ReadyAPI and Postman and they both looks the same just besides the Header information. Method: Get Raw Request in Ready API: Get https://url Accept-Encoding: gzip,deflate Authorization: Bearer Content-Type: application/vnd.api+json Content-Type: application/json Content-Length: 0 Host: domain-uat.sdvi.com Connection: Keep-Alive User-Agent: Apache-HttpClient/4.5.2 (Java/1.8.0 Raw Request in Postman: Get https://url Authorization:Bearer INDdCRdJ/XXXXXXXXXXXXXXXXXXX+ Content-Type:application/vnd.api+json Response for ReadyAPI: still the same as below HTTP/1.1 406 NOT ACCEPTABLE Server: nginx Date: Wed, 10 Jan 2018 02:47:31 GMT Content-Type: application/json Content-Length: 297 Connection: keep-alive { "errors": [ { "detail": "The resource identified by the request is only capable of generating response entities which have content characteristics not acceptable according to the accept headers sent in the request.", "status": "406", "title": "Not Acceptable" } ] } Response for Postman: 201, OK Now what you/ anyone else suggest? Thanks Getting a 406 Status code in Ready API 2.2.0 ver, while it works completely fine in Rest client Getting a 406 Status code in Ready API 2.2.0 ver, while it works completely fine in Rest client and Postman, Please see the detail of the error message and provide your expert opinion, or the solution when you came across with the same problem <Fault xmlns="https://xxxx-uat.sd.com/api/v2/movies"> <errors> <e> <detail>The resource identified by the request is only capable of generating response entities which have content characteristics not acceptable according to the accept headers sent in the request.</detail> <status>406</status> <title>Not Acceptable</title> </e> </errors> </Fault> I don't understand why Ready API giving me this error, while using the same information (url, method, auth code, header etc.) in Rest client and Post it works fine. Can someone please help and guide me how to fix this issue. I'm using Ready API 2.2.0 and its a paid version. Thanks, API_Tester