Contributions
How to update data source (grid) dynamically ?
Hi, I have created a project and test case with following steps.. 1. Data Source ( Type Grid) - 9 input values 2. REST Request ( which takes values from data source) 3. Groovy Script ( some logical operations) 4. Data Loop Task : At the moment I am using fixed data in data source, but I want to change the values in Data Source (Grid) from REST Service JSON response. So I can update the Data Source dynamically from JSON response. Json response for an api returns the 9 values which I need in Data Source. Is anyone come across this kind of scenario and any help will be appreciated .. My Thoughts : 1. Write Script to parse the JSON Response and store values in an array/list 2. Then transfer them to Data Source by some sort of scripting. Please help me in achieving step 2 if possible. Regards, Suresh11 years agoPlace ReadyAPI QuestionsReadyAPI Questions3KViews0likes3CommentsRe: How do i get JSON values from a response in Groovy
Hi, I am bit new to Groovy Scripting and handling JSON Resonse . I have a following JSON Response : JSON Response : ---------------- { "altmetric_id": 1492155, "counts": { "readers": { "citeulike": "4", "connotea": "0" }, "demographics": { "poster_types": { "member_of_the_public": 19, "researcher": 12, "practitioner": 6, "science_communicator": 2 }, "geo": {"twitter": { "DK": 2, "ES": 3, "US": 17, "GB": 1, "JP": 3, "IT": 1, "MX": 2, "VE": 2 }} }, "images": { "small": "https://altmetric-badges.a.ssl.fastly.net/?size=64&score=26&types=fgtttttt", "medium": "https://altmetric-badges.a.ssl.fastly.net/?size=100&score=26&types=fgtttttt", "large": "https://altmetric-badges.a.ssl.fastly.net/?size=180&score=26&types=fgtttttt" }, "score": 25.45, "last-update-time": "2013-06-10 14:27:09", "created": "2013-05-30 12:07:39" } --------------------------------- I need to capture following dates from above response .. "last-update-time": "2013-06-10 14:27:09", "created": "2013-05-30 12:07:39", Then need to some date related comparisons.. Can anyone let me know how to get "last-update-time" & "created" dates and store in two variables ? Regards, Suresh76KViews0likes0Comments