- Trending Categories
- Data Structure
- Operating System
- MS Excel
- C Programming
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
tests["Status Code should be 200"] = responseCode.code === 200 tests["Response time lesser than 10ms"] = responseTime<10
The tests is a variable of type array which can hold data types- integer, string, Boolean and so on. The Status Code should be 200 and Response time lesser than 10ms are the test names. The responseCode.code is the code obtained in the Response and the responseTime captures the time taken to obtain the Response.
Select the GET method and enter an endpoint then click on Send.
Click on the Test Results tab in Response.
The Test Results tab displays the test which has passed in green and the test which has failed in red. The Test Results (1/2) means one out of the two tests has passed. Response shows the status as 200 OK and response time as 129ms (the second test checks if the response time is lesser than 10ms).
- Related Articles
- How to set Tests using Functional Method in Postman?
- How to create a PUT request in Postman?
- How to create a DELETE request in Postman?
- How to create a POST request in Postman?
- How to see request logs in Postman console?
- How to use Global Variable in Postman Request?
- How to share Session ID Cookie with another request using Postman?
- Executing Tests on Cookies in Postman
- How to group selected tests from a set of tests in pytest?
- What is Pre-Request Script in Postman?
- How to set a global variable in Postman?