✨ Postman now has it's own BDD test syntax ✨
Postman-BDD is no longer necessary, because Postman now has its own BDD and fluent syntax built-in!
I recommend that you start using Postman's new test syntax instead of Postman-BDD. However, if you want to continue using Postman-BDD, then you can find the original ReadMe here.
// example using pm.response.to.havepm;// example using pm.expect()pm;// example using response assertionspm;// example using pm.response.to.be*pm;
Postman's new BDD and fluent syntax are a bit different from Postman-BDD. Here are the changes you need to make to migrate your tests:
describe() blocks were optional in Postman-BDD, and they don't exist at all in Postman's new syntax. So just remove them.
it blocks with
it blocks to define tests, such as:
Postman now has
pm.test blocks, which work the same way. For example:
Move hooks to folder/collection scripts
Postman-BDD allowed you to define common assertions or setup/teardown logic in hooks, such as
afterEach(). This is no longer necessary because Postman now allows you to define test scripts for folders and collections.
Different assertion syntax
Postman now supports its own fluent assertion syntax, which is somewhat similar.