I want to implement End to End automation testing for my API’s, till now i am able read parent tags data from json, i am not able to read nested arrays or not able to set it into csv file, Actually i don’t idea how to set values in csv referring json. I need help to set request json to Csv file for Automation testing.
i am attaching request json below which i need to convert it into csv file.
If I’m reading this correctly, you just need help substituting variables in your request?
If that’s the case, then you can use variables directly in the request body. Make the variable names the header from your csv.
{
"ConfigurationParam: {
"AgentCode": "{{AgentCode}}",
"ProductCode": "{{ProductCode}}"
},
"PlanType": "{{PlanType}}",
... // Do this for all variables
}
For the columns that are already JSON, i’m not positive, but you might just be able to use it like a normal variable in the request. If not, you would have to stringify the value in the pre-request script.