In my post request create a job whose response have only id as follow,
{"id":626}
And I want to save the id value which is 626 in a csv or any file and after my test complete I want use all these value from this file to check the status of the job in the tear down
thread group.
how to complete this ? I have following script but getting error,
new groovy.json.JsonSlurper().parse(prev.getResponseData()).id.each { entry ->
new File('result.csv') << entry.get('id') << System.getProperty('line.separator')
}
error details,
2021-01-15 12:13:05,699 ERROR o.a.j.e.JSR223PostProcessor: Problem in JSR223 script, JSR223 PostProcessor
javax.script.ScriptException: groovy.lang.MissingMethodException: No signature of method: java.lang.Integer.get() is applicable for argument types: (String) values: [id]
Possible solutions: getAt(java.lang.String), next(), grep(), grep(java.lang.Object), wait(), abs()