Skip to content

Make Selenium Easy

And Keep It That Way

  • Home
  • Share
  • About Us
  • Toggle search form

Postman Tutorial Part 20 – Use Variables in Request Builder OR How To Build Parameterized Request in Postman

Posted on 04/23/2025 By admin

Hello Folks,

We have learnt already about :-

What is Variable in Postman?

Global Variables in Postman

Environment Variables in Postman

In this post, we will see how can we use variables in request body to create parameterised request.

Consider we have an API which registers a patient on any application. You need to pass required patient data like Name, Age, Gender, Address etc. These data will vary patient to patient. Everytime data needs to be changed to register a new patient. So if we construct a request body with hardcoded data in it, we need to keep editing request body for new patient which is not best practise.

Example is below:-


{
    "name" : "Mr. Clark",
    "Age" : "25",
    "address" : "London"
}

You will face below problems if you hardcode data in request:-

  1. You need to keep changing data in request body.
  2. You might misplace data.
  3. Another member will not able to edit data properly if not aware about request body.
  4. You can not use data from external sources.
  5. You can not achieve data driven testing.
  6. We must always keep logic and data separately.

All above problems can be resolved by parameterizing request body.

We know that we can create global and environment variables. We can use them in our requests.

we will parameterized below API:-

https://restful-booker.herokuapp.com/auth

Its request body:-

{ “username ” : “admin”, “password” : “password123”

}

Uncategorized

Post navigation

Previous Post: REST Assured Tutorial 28 – What is Plain Old Java Object (POJO) ?
Next Post: How To Use ThreadSafe Singleton Class To Manage Instance Variables In Automation Framework – Java

Related Posts

July 3, 2019 – Make Selenium Easy Uncategorized
February 11, 2018 – Make Selenium Easy Uncategorized
Where Does PageFactory Suck – Selenium WebDriver – Java Uncategorized
Rūto – Get Started & Save Time in Finding Locators Uncategorized
OverloadedInitElements – Make Selenium Easy Uncategorized
Git Tutorial 32 – How To Restore Deleted And Committed But Not Pushed File Without GIT Reset? Uncategorized

Recent Posts

  • How to Set Up Selenium WebDriver with Python Step by Step
  • How to Set Up Selenium WebDriver with Java from Scratch
  • What Is Selenium and Why It Is the Most Popular Test Automation Framework
  • Getting Started with Selenium 4: What Is New and How to Upgrade from Selenium 3
  • Manual Testing

Recent Comments

No comments to show.

Archives

  • April 2026
  • April 2025
  • March 2025
  • February 2025
  • January 2025
  • December 2024
  • November 2024
  • October 2024
  • September 2024
  • August 2024
  • April 2024
  • March 2024
  • February 2024
  • December 2023
  • October 2023
  • August 2023
  • November 2022
  • September 2022
  • August 2022
  • July 2022
  • May 2022
  • March 2022
  • October 2021
  • April 2021
  • March 2021
  • January 2021
  • December 2020
  • October 2020
  • September 2020
  • August 2020
  • June 2020
  • May 2020
  • April 2020
  • March 2020
  • February 2020
  • January 2020
  • December 2019
  • November 2019
  • October 2019
  • September 2019
  • August 2019
  • May 2019
  • December 2018
  • November 2018
  • October 2018
  • September 2018
  • August 2018
  • July 2018
  • January 2018

Categories

  • Getting Started
  • Uncategorized

Copyright © 2026 Make Selenium Easy.

Powered by PressBook Masonry Dark