Is there a way I can run postman tests with mocha?
Hey @Manvinderverma. Postman provides a
pm.* api that can help you get started with BDD tests easily. You can use the
pm.expect assertion function which was built on top of chai. If you’re familiar with mocha, you’ll find the interface really familiar. Read more about it here. http://blog.getpostman.com/2017/10/25/writing-tests-in-postman/
Here are a few examples that you can look at for reference. https://www.getpostman.com/docs/postman/scripts/test_examples?q=expect&idx=blog&p=0
On a side note, is there a specific functionality that you’re trying to achieve which is not possible with the current solution? If so, please let me know and I’ll try and help you resolve it.
Thanks for your reply. I’ll give it a try.