Running a list of payloads #1918
-
Hi All: Really enjoying Bruno so far. I have a group of sample payloads that are used to test various scenarios of a POST. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 6 replies
-
I have a similar question. |
Beta Was this translation helpful? Give feedback.
-
Same question. Here is my test: test("all categories are not empty", async function () {
const axios = require("axios");
const responseBody = res.getBody();
const jsonFeedURL = responseBody.jsonFeedURL;
for (const item in responseBody.cards) {
const card = responseBody.cards[item];
console.log(card.name);
const url = jsonFeedURL + card.name;
console.log(url);
const response = await axios.get(url);
console.log(response.data[0].id);
expect(response.data[0].id).to.be.not.empty;
}
}); As far as I understand, there is some issue with calling expect in the loop. I believe there should be a solution for this. Any ideas? |
Beta Was this translation helpful? Give feedback.
-
Any luck on this? |
Beta Was this translation helpful? Give feedback.
-
To run through a list of payloads, we recommend storing them in JSON/CSV and iterating through them in the collection runner. |
Beta Was this translation helpful? Give feedback.
To run through a list of payloads, we recommend storing them in JSON/CSV and iterating through them in the collection runner.
See Data Driven testing for more details