Open Faz540 opened 6 years ago
@Faz540 Thanks for this request. We're aiming to deprecate the old tests object, so this seems counter-intuitive to me. However, it is understandable that there might be old requests that use a combination of these kinds of assertions. @shamasis @kamalaknn Thoughts?
@madebysid Please tell me there will be a way to monitor the true/false values of the new "pm.test()" tests in the future? Ofcourse, other than viewing the Tests tab in the UI.
I agree, pm.test() returning boolean status or some object to retrieve test status would be super-userful
I use the pass/fail states of the tests to determine whether to continue travelling down one path or another. It's doesn't feel DRY writing the tests to get the messaging and then rewriting them in a slightly different way to get the pass/fail state so I can have a functioning test suite. Without this feature postman becomes a lot less useful to me.
I need this too. It's a pain to re-evaluate for pass/fail state to do some control logic for the overall collection path.
Really looking forward to - pm.test.result() or any boolean returned by pm.test()... Until then, I did not even believed it was not possible. Painful.
Hi, Given I have the below test script in my endpoint and I'm expecting both tests to fail.
The console will only output the first test, the "old" way of writing tests.
If possible, can we expose the newer "pm.test()" tests to the same tests object. Or given them their own object.
I use this to get the number of failed tests and I then send myself a Slack Message if the fail counter is greater than 0.
I got into detail about this here: https://community.getpostman.com/t/notify-slack-when-test-failures-are-found/175/8