是否可以停止在预请求脚本中运行的测试但不能停止整个测试集合的运行?
我看过各种帖子提到这些方式:
postman.setNextRequest(null);
throw new Error("Error");
这些将阻止测试完成,但似乎也停止了我不想要的整个测试集合运行。
更新
预请求脚本:
var test = 'Wait for create transaction request to complete';
var numRetriesRemaining = postman.getEnvironmentVariable("numRetriesUntilCompletionExpected");
if (numRetriesRemaining == -1) {
// stop the request from being sent and stop the "Tests" part from running
// but also don't stop other tests in the collection
}