Forum Discussion
SmartBear_Suppo
Alumni
12 years agoHi,
You would have to create a property in the Groovy datasource that has the value of exactly what you want to access in the JSON, or create a Groovy test step that will parse the property in the Groovy datasource and set it to a new property to use in another request test step. You could use the property transfer test step with JsonPath to use it in a Request test step, however, the JSON being returned from the toString method with JsonSlurper is invalid. Therefore you can not use the JsonPath on invalid JSON content. You can check by copying the JSON that is being logged and validate in http://jsonlint.com/.
Regards,
Marcus
SmartBear Support
You would have to create a property in the Groovy datasource that has the value of exactly what you want to access in the JSON, or create a Groovy test step that will parse the property in the Groovy datasource and set it to a new property to use in another request test step. You could use the property transfer test step with JsonPath to use it in a Request test step, however, the JSON being returned from the toString method with JsonSlurper is invalid. Therefore you can not use the JsonPath on invalid JSON content. You can check by copying the JSON that is being logged and validate in http://jsonlint.com/.
Regards,
Marcus
SmartBear Support