Member-only story
Writing first test script and chaining outputs between scripts.
Till now , we have executed requests but have not written any testscripts. Meaning, there were no validation steps to verify whether the request passed or failed.
Now let us see who to do this. Let us write our first test script.!!!! :)
Automation tests with Postman:
There are two parts were we can write the scripts for our tests.
- Pre-request script
- Tests
Here pre-request script act as the test setup script, meaning, it will get executed before the tests. So if you have any pre-requisite like creating user variable or validating whether a user variable value exists, you can do it here.
Tests are were we write the actual tests, it get executed after we get the response.