Contributions
Re: ReadyAPI 3.47 - At least one test step was not added to the test case.
I am seeing the same issue with the version 3.47,"At least one test step was not added to the test case. Please make sure you have all the plugins installed and reload the project". Mine is Windows, and I don't see the folder "ReadyAPI". Do we have any fix for this issue? Now, I am using ReadyAPI 3.45 Version!9 months agoPlace ReadyAPI QuestionsReadyAPI Questions694Views1like0CommentsRe: How to compare 2 Json content from 2 different text files and return only the differences
ThanksKarelHusa! Not sure how to write the Groovy Script for generating the file with Date/TimeStamp in the file name, can you please suggest me!2 years agoPlace ReadyAPI QuestionsReadyAPI Questions637Views0likes1CommentRe: How to compare 2 Json content from 2 different text files and return only the differences
HiKarelHusa, thanks for your response. The requirement is like this, 1. Today I ran the test case(REST API) and got the response let's say A 2. Tomorrow if I run the same test case, I may get the same response or a different response if there any changes to our config file, let's say that is B Now, I have two responses and I need to compare both the responses A and B(both A and B are Json responses), to make sure that there are no changes OR if there are any changes, what are they( I mean where exactly the changes are additions/deletions/modification to any values in the response etc.,). So, I am sending the responses to a text file, and in my Groovy script I am hard coding the two file paths(Previous response and Current responses) in order to read the content from those two files. I want to avoid hard coded file paths from my Groovy script. Of course I am also trying to see if there are any other alternatives to do that comparison and return the differences from both the responses, to make it simple. Thanks again!2 years agoPlace ReadyAPI QuestionsReadyAPI Questions661Views0likes3CommentsHow to compare 2 Json content from 2 different text files and return only the differences
Hi, I found the way to save the Json response to a text file and compare both the file contents (the 2 Json responses saved from previous run and current run) byusing the Groovy script. But for now, I have hardcoded the file location for both the files in the code. I am looking for a solution to remove that hard coded file path. Can anyone have suggestions for me! Thanks in-advance! Here is the Groovy Script what I am using, import groovy.json.JsonSlurper; import groovy.json.JsonOutput; log.info("Start"); def previousResponse = new File('\PreviousResponse.txt').text; // Hard coded file path from my local drive, which I want toavoid def currentResponse = new File('\CurrentResponse.txt').text; // Hard coded file path from my local drive, which I want toavoid //JsonSlurper parses the text or reader content into a data structure of lists and maps def slurperA = new JsonSlurper().parseText(previousResponse) def slurperB = new JsonSlurper().parseText(currentResponse); //Creating empty ArrayList def listA = []; def listB = []; slurperA.each { key, value -> loop(listA, key, value) } slurperB.each { key, value -> loop(listB, key, value) } //Logs this on the Console log.info("matches: " + listA.intersect(listB)); //logs the comman fields from both the Jsons log.info("mismatches A: " + listA.minus(listB)); log.info("mismatches B: " + listB.minus(listA)); //Creating a Global property on ReadyAPI, to Set the Json Response difference to it def diff_Current_Response = listB.minus(listA); def jsonDiff = JsonOutput.toJson(diff_Current_Response); def json_beauty = JsonOutput.prettyPrint(jsonDiff); com.eviware.soapui.SoapUI.globalProperties.setPropertyValue("configDiff", json_beauty); //User defined method for looping through each and every field in the Json response def loop(list, key, value) { if(value.class == null) { if(value != null && !value.isEmpty()) { value.each { k, v -> loop(list, (key + '.' + k), v); } } else { list.add((key)); } } else if(value.class == ArrayList) { value.each { loop(list, key, it); } } else { list.add(key + " = " + value); } } //Groovy "Script Assertion" def previousJsonResponse = new JsonSlurper().parseText(previousResponse); def currentJsonResponse = new JsonSlurper().parseText(currentResponse); assert currentJsonResponse == previousJsonResponse; log.info("Done");2 years agoPlace ReadyAPI QuestionsReadyAPI Questions714Views0likes5CommentsRe: Looking for the Groovy script to compare 2 JSon responses
Thank you so muchSarahS! and sorry for the late reply. Doesthe smart Assertion workfor the config files where the new additions/deletions happen frequently? Today I have a response with 10 fieldsin the response and tomorrow if I run it again,I may see there will be 12 or 15 fields (few more fieldsgot added). So, in that case will that smart assertion works? And what if I want to see what are all the fields got added from the previous run/response? Thanks again!2 years agoPlace ReadyAPI QuestionsReadyAPI Questions573Views0likes0CommentsLooking for the Groovy script to compare 2 JSon responses
Hello All, I have a REST request. I want to run the request and save the response as a text doc. I want to run it again after couple of days and see if both the responses(Old and New) are same or not(assert). Can some one help me to understand, and how to achieve that with the Groovy script. Thanks in-advance! Regards, Sudhakar721Views0likes2CommentsDuplicate field 'Item' for `ObjectNode`: not allowed when `DeserializationFeature.FAIL_ON_READING_DU
Hello, Can someone help me with any suggestion. I am seeing the below message on ReadyAPI response with HTTP status code 200. I am using the ReadyAPI version 3.40.2 Duplicate field 'Item' for `ObjectNode`: not allowed when `DeserializationFeature.FAIL_ON_READING_DUP_TREE_KEY` enabled at [Source: (String) ....Solved502Views0likes1CommentHow to upgrade my ReadyAPI to 3.20.0
Can anyone guide me how to upgrade my ReadyAPI version from 3.10.1 to the latest version. When I start the ReadyAPI, I am seeing that there is a latest version available and I am also seeing the options to postpone or to download. But when I click on Download, nothing is happening.Solved3 years agoPlace ReadyAPI QuestionsReadyAPI Questions782Views0likes1Comment- 3 years agoPlace ReadyAPI QuestionsReadyAPI Questions371Views0likes0Comments