ContributionsMost RecentMost LikesSolutionsRe: Require condition to check depending upon the Json Node response hiChrisA Thanks for the detailed reply. I have written the code like this. def response = context.expand( '${CurrentSprint#Response#$[\'values\'][0][\'id\']}' ) log.info response if (response != null) { testRunner.testCase.testSuite.testCases["Jira Executions"].setPropertyValue("Active1", "$response") } else { testRunner.testCase.testSuite.testCases["Jira Executions"].setPropertyValue("Active", Empty) } Where asdef response = context.expand( '${CurrentSprint#Response#$[\'values\'][0][\'id\']}' ) the id will be coming blank some times in the groovy response, So i wrote if loop, to save the value in custom properties, where as when the response is null or not null its checking only condition. Attached is the groovy response.. So if the response is null i have to Set custom propery as string empty, other wise what ever the value is coming in the response that value i have to store in the custom properties Require condition to check depending upon the Json Node response Hi, Depending upon the json node, for a json node if the key exists and value exists i have to set property in custom properties and if the key value doesnt exist then i have to set the property with null value. My Same response with the Key value exists in response for a Json node. { "maxResults" : 50, "startAt" : 0, "isLast" : false, "values" : [ { "id" : 221, "startDate" : "2018-06-26T20:00:16.850Z", "endDate" : "2018-07-09T21:00:00.000Z", } ] } in Above json response, if the id exists and the value for the id i must set to a custom property Sample response for which for json node values. id doesent exists, in this scenario i have to set custom property as null { "maxResults" : 50, "startAt" : 0, "isLast" : true, "values" : [ ] } i tried below script, but its not working as expected. def response_id = context.expand( '${CurrentSprint#Response#$[\'values\'][0][\'id\']}' ) if (response_id !=null) { testRunner.testCase.testSuite.testCases["Test"].setPropertyValue("Active", "$response_id") } else { testRunner.testCase.testSuite.testCases["TEST"].setPropertyValue("Active","null") } SolvedRe: How to Handle different resources for the same point nmrao This wont help. My suite has to work with the both the versions of endpoints in the same environment, As i told earlier, for ex: Before the endpoint url is like abcd.com/users where as now the endpoint is changed toabcdef.com/new/users but if i use property expansion, and parameterize the endpoints it will take only one version of endpoints. How to Handle different resources for the same point Hi Is there a way how to parameterize the resource in the endpoint url I have Two versions of the endpoints for one version already automation is done, Now we are getting one more version of the endpoints with the resource different for the endpoint like for ex: Before the endpoint url is like abcd.com/users where as now the endpoint is changed toabcdef.com/new/users the resource differs from endpoint to endpoint So is there a way where both the endpoints should work with the existing automation already done? Thanks SolvedRe: How to Ignore null values in the POST Request HimanshuTayal Thanks it's working fine now. Re: How to Ignore null values in the POST Request HimanshuTayal Thanks for the detailed explanation, now the tables are coming with out null, where as the each table must come in quotes, like example, while sending the request the table list must be in below format. "Table1", "Table2", "Table3", "Table4" Where as now request its going as "Table1, Table2, Table3, Table4" Because of that still the backend jobs are failing. is there a way where we can send the request in the below format. "Table1", "Table2", "Table3", "Table4" Thanks in Advance, Thanks Re: How to Ignore null values in the POST RequestHi Himanshu Yes my groovy code is same what u have posted. You mean to say i have to use below code in my groovy script? And change the table name accordingly? StringBuilder sBuild = new StringBuilder(); if (respvalue== null) { testRunner.testCase.testSuite.testCases["Post_Dags"].removeProperty("Table1"); } else { testRunner.testCase.testSuite.testCases["Post_Dags"].setPropertyValue("Table1",respvalue) // Do this in where ever you are storing value sBuild.append("\${#TestCase#Table1},") } //at the end of the script write this line String str = sBuild.toString() //to remove last , from string str = str.substring(0, str.length() - 1) testRunner.testCase.setPropertyValue("data_to_use",str); I tried using ur code but i was getting compilation errors saying sbuild is already used, so i changed for ever table as sbuild1, sbuild2 and so on, But still it was picking only one table Please let me know if i am doing anything wrong And at the end of the script also u want me to write for each table? And change data_for_use also for each table? Re: How to Ignore null values in the POST RequestHimanshu You are almost correct..where as i am using only one jdbc connetion.. in that jdbc connetion only i will get list of table names. Yes i am using groovy script to pick the random table names using the json nodes from thr jdbc response. I used the code you provided.. but its picking only table.. though i have 10tables storing in custom variables ThanksRe: How to Ignore null values in the POST RequestHimanshu, Thanks for the update.. i am not fetching the data from the tables, using jdbc connection i am getting list of table names and using groovy and using the json nodes of the jdbc connection response i am storing some table names in custom variables.. and i am using this custom variables in the post request by using get data options I am storing 10 table names in custom variables. So the problem is some times the json nodes which i am using may not be available in response.. because of that in custom variables doesnt contain any value for that.. so in post since we are using that custom property.. and when request is sent its going as null or empty..bcoz of that the backend jobs are failing. Hope this clears.Re: How to Ignore null values in the POST Request HimanshuTayal Thanks for the update.. this works only for one table, what about if i have multiple tables?