I am trying to write some tests for Postman. Many of the requests require an API key that gets returned by an initial GET request.
To set something hard-coded that is not dynamic, it looks like the test code is of the form
let variable = pm.iterationData.get("variable");
console.log("Variable will be set to", variable);
How do I set a return value as a global variable and then set that as a header parameter?
Aucun commentaire:
Enregistrer un commentaire