I'm trying to pass a JSON object from one feature file to another feature file.So that I can use the JSON object as request body for an API call
Below is my code
Feature1.feature
Scenario:__
* def req = {"param1":"value1","param2":"value2"}
* def tempResponse = call read('Feature2.feature') {temp:req}
Feature2.feature
Scenario:___
Then print #(temp)
Give url '___'
And request #(temp)
When method POST
status 200
In my Featue2.feature file #(temp) does not have any JSON object.
Can I pass a JSON object from one feature file to another. Is there an alternate approach to this?