How I can skip tests when the first one is failed

Hello, so hot topic.
I saw a lot of similar Q&A around this theme.
But still can not find the solution for my case:

I have a main, required test with a few expected results, and if one of them is failed → test is failed, the point is if the test is failed is not make sense to run others.

pm.test("Request is valid and has a body: " + pm.collectionVariables.get("exchange"), function () {;;

Now I use such construction

let skipTest = data.length === 0;
(skipTest ? pm.test.skip : pm.test)("Each array item have required fields: " + pm.collectionVariables.get("exchange"), function () {

  data.forEach(function(item) {
      pm.expect(item).to.have.all.keys('base', 'quote', 'volume', 'price', 'volumePercent', 'spread', 'category', 'time');

But in the skipTest part only one check

Is there any way to put in the variable skipTest a boolean value that the first test failed?


If your test fails on the status code, then the other assertions won’t run.

Your error message will be something along the lines of…

AssertionError: expected response to have status code 200 but got xyz

It will not mention the other assertions.

If you actually want all three assertions to run at all times, then you can wrap them in a try\catch.