REST API Testing

REST API testing means calling your endpoints directly, without a front-end, to check that they return the right data and status codes. An API client such as Postman lets you choose the HTTP method, URL, headers, and body, then shows the response, status code, and time. It is used to find bugs early, confirm that each endpoint follows its contract, and test success and failure cases before any UI or mobile app depends on the API. Spring Boot APIs are well suited to this because every endpoint is just a URL that Postman can call.

Features

  • Test every endpoint (GET, POST, PUT, DELETE) without building a UI
  • Send JSON bodies, path variables, query parameters, and headers
  • Check the status code, response body, and response time
  • Save requests in a Collection and rerun them anytime
  • Write automatic checks in the Tests tab using JavaScript
  • Use Variables (for example {{baseUrl}}) so URLs are not repeated
  • Test failure cases such as a missing student (404)

REST API Testing Types

  • Manual testing: you send each request yourself in Postman and read the response. This is what this experiment does.
  • Automated testing in Postman: JavaScript checks in the Tests tab verify status codes and response values on every run.
  • Collection runner testing: the whole Collection runs in order (create, read, update, delete) with one click.
  • Positive testing: valid requests that should succeed, such as creating a student with correct data (201).
  • Negative testing: invalid requests that should fail properly, such as reading student id 999 (404).
  • Code-level testing: MockMvc and @SpringBootTest tests written in Java. This is a different approach and is not part of this Postman experiment.
Scroll to Top