0

I'm writing API testing using Postman. I plan to write a failed test when I'm not implement the API yet.

I'm writing this at this moment.

pm.test("Not implement yet", function () {
    pm.expect(true).to.eql(false);
});

Is there something like this in Postman? I just want a test to be fail.

pm.test("Not implement yet", function () {
    pm.expect().fail();
});
Will Huang
  • 2,955
  • 2
  • 37
  • 90

1 Answers1

1

You can use pm.expect.fail('This failed because ...');

Christian Baumann
  • 3,188
  • 3
  • 20
  • 37
  • I was not able to find documentation about this API before. Now I realized that it is from **ChaiJS expect BDD syntax** https://www.chaijs.com/api/bdd/ – Will Huang Aug 11 '23 at 04:18