Tools:
If the test has conditions and the condition is false (we don't execute pm.test() {} in the condition block), I see the test in the report and it will never end.
Example:
let jsonData = JSON.parse(responseBody);
for (let i = 0; i < jsonData.data.length; i++) {
let id = jsonData.data[i].id;
pm.test("event id != null", function () {
pm.expect(jsonData.data[i].id).to.not.eql(null);
});
let event_type = jsonData.data[i].attributes.type;
if (event_type === "event") {
pm.test("event type === null", function () {
pm.expect(jsonData.data[i].relationships.event_type).to.eql(null);
});
}
}
Tools:
If the test has conditions and the condition is false (we don't execute
pm.test() {}in the condition block), I see the test in the report and it will never end.Example: