I am writing an API test in Postman, and I would like it to succeed if a Number
is returned or the string "NA"
. Based on the
pm.test('Qty returned is number', () => {
pm.expect(typeof parseInt(pm.response.json().qty)).to.be.not.equal('NaN');
});
Writing as two separate tests, one will pass and one will fail.
How can I code this exception into a single test?
Aucun commentaire:
Enregistrer un commentaire