API testing using postman – Part 3 : Environments & Pre-request Script basics
This is series of the API Testing using postman First
- Part 0 –API testing tutorials – Getting Started
- Part 1 – API testing using Postman – Part 1
- Part 2-API testing using postman – Part 2(Running in Jenkins)
- Part 3 – API testing using postman – Part 3: Environments & Pre-request Script basics
What is an API and API Testing?
API is an acronym for Application Programming Interface.
API testing is entirely different from GUI testing and mainly concentrates on the business logic layer of the software architecture.
Introduction
In this tutorial, we are building to learn Environments & Pre-request Script basics in Chrome POSTMAN tool for API Testing.
Download POSTMAN – https://www.getpostman.com
POSTMAN’s Environments give you the ability to customize requests using variables.For example, your local machine, the development server, or the production API.Please note that POSTMAN’s environments can be downloaded and saved as JSON.
Variables can be used in the following form – {{variableName}}
The need of the Env.
Environments also help you separate sensitive data from your collection like keys and passwords.
Pre-request scripts are snippets of code associated with a collection request that is executed before the request is sent.