Skip to content

Make Selenium Easy

And Keep It That Way

  • Home
  • Share
  • Toggle search form

Postman Tutorial Part 15 – Adding Automation Test Scripts In Postman

Posted on 02/19/2025 By admin

Hello Folks,

When we hit any API, we get some response along with status code, response time, headers etc. As of now we have verified it manually. Will it not be good if these assertion which we do manually should be auto performed once request is hit? A kind of automation testing of API.

Consider an example:-

Suppose you have a POST API to create a user. We need to hit this API with request body and it returns response which is generally details of newly registered user. It’s our responsibility to verify that whatever details we provided for user creation, same details are coming in response with extra properties like user id etc ( depends on API development). We should also verify the status code and message returned by APIs to cover more scenarios. In fact rigorous testing of API will drastically reduce number of probable bugs while during integration testing or system testing or front end testing.

It will be great if all discussed above could be achieved using automation testing of APIs. We can achieve the same using “tests” in Postman. All these tests will be run once request is hit and response is present.

Postman provides to write and run “Tests” for each request. It uses Javascript language. You should be aware of basic Javascripts. In face Postman makes it easier to add tests (By providing code snippets) to your request which we will see in this post.

In this post, we will going to practise using another set of APIs from Restful-Booker.

Above website provide a POST API to generate authentication token. Details are as below:

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

Request Body: –

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

}

Uncategorized

Post navigation

Previous Post: TestNG Tutorials 63: Dependency in TestNG – Usage of Regular Expressions with DependsOnGroup
Next Post: REST Assured Tutorial 53 – How to create ResponseSpecification using ResponseSpecBuilder

Related Posts

image – Make Selenium Easy Uncategorized
How To Handle A Web Table In Selenium Webdriver | Make Selenium Easy Uncategorized
selenium testng tutorials Uncategorized
Java Programs | Make Selenium Easy Uncategorized
March 17, 2019 – Make Selenium Easy Uncategorized
image – Make Selenium Easy Uncategorized

Recent Posts

  • Getting Started with Selenium 4: What Is New and How to Upgrade from Selenium 3
  • Manual Testing
  • Baby Steps To Become Efficient Selenium-Java Automation Tester
  • Features of Selenium 4.0.0 Release – Java Binding
  • Part 1: Handling Drop-down Created Using SELECT Tag In Selenium

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