- Pre-request script (It will run the script before execution)
- Test script (it will run the script after execution)
- Collection level
- Folder level
- Request level
- If we give scripts in pre-request and test scripts at all levels. The order will be executed in the following manner.
- Collection -> Folder-> Request (until this pre-request) -> Request -> Response -> Collection -> Folder -> Test script.
- Variables are created to reduce the effort in updating data every time. In Postman, we are also creating variables to update data every time.
- For example, some parts of the URL are common across all the requests ("https://localhost3000"). This can be stored in one variable and can be used anytime whenever we want.
- If localhost number 3000 changes also, we can update the variable, it's a one-time update and can be updated everywhere.
- Global - Accessible in Workspace
- Collection - Accessible within the collection.
- Environment - Accessible in all collections, but we need to switch to a particular environment.
- Local - Accessible only within the request (Specific to Request).
👋 Hi, I'm Suriya — QA Engineer with 4+ years of experience in manual, API & automation testing.
📬 Contact Me | LinkedIn | GitHub
📌 Follow for: Real-Time Test Cases, Bug Reports, Selenium Frameworks.