Workflow: How to run the next request only if all tests are successful?

Hi guys,

I have the following issue: I want to run a workflow with multiple requests. The first request in this workflow is the authentication request. The workflow should only continue if the authentication requests is successful. If the authentication request fails, the workflow should stop. To detect if the authentication request was successful, I want to add some tests. After those tests, I want to check if all of them were successful, and then decide to continue or stop the workflow.

Question: How can I detect, if all tests were successful? I’m looking for something like this:

pm.test("Test 1", () => { ... });
pm.test("Test 2", () => { ... });

// the next line would be nice, but is currently not possible
pm.after(allTestsSuccessful => {
    if (allTestsSuccessful) {
        pm.setNextRequest('Next Request');
    } else {