Found 73 Articles for Postman

How to create a POST request in Postman?

Debomita Bhattacharjee
Updated on 18-Nov-2021 13:17:15
Postman POST request allows appending data to the endpoint. This is a method used to add information within the request body in the server. It is commonly utilized for passing delicate information.Once we send the request body via the POST method, the API, in turn, yields certain information to us in Response. Thus a POST request is always accompanied by a body in a proper format.Create a POST RequestStep1 − Click on the New menu from the Postman application. The Create New pop-up comes up. Then click on the Request link.Step2 − SAVE REQUEST pop-up comes up. Enter Request name ... Read More

How to create a DELETE request in Postman?

Debomita Bhattacharjee
Updated on 18-Nov-2021 13:06:12
Postman DELETE request deletes a resource already present in the server. The DELETE method sends a request to the server for deleting the request mentioned in the endpoint. Thus it is capable of updating data on the server.Before creating a DELETE request, we shall first send a GET request to the server on the endpoint :http://dummy.restapiexample.com/api/v1/employees.On applying the GET method, the below Response Body is obtained.Let us delete the record of id 2 from the server.Create a DELETE RequestStep 1 − Click on the New menu from the Postman application. The Create New pop-up comes up. Then click on the ... Read More

How to create a PUT request in Postman?

Debomita Bhattacharjee
Updated on 18-Nov-2021 12:56:56
A Postman PUT request is used to pass data to the server for the creation or modification of a resource. The difference between POST and PUT is that POST request is not idempotent.This means invoking the same PUT request numerous times will always yield the same output. But invoking the same POST request numerous times will create a similar resource more than one time.Before creating a PUT request, we shall first send a GET request to the server on an endpoint:http://dummy.restapiexample.com/api/v1/employees.On applying the GET method, the Response body obtained is −Now, let us update the employee_salary and employee_age for id ... Read More

How to parameterize requests in Postman?

Debomita Bhattacharjee
Updated on 18-Nov-2021 12:46:04
We can parameterize Postman requests to execute the same request with various sets of data. This is done with the help of variables along with parameters. A parameter is a part of the URL used to pass more information to the server.The data can be used in the form of a data file or an Environment variable. Parameterization is an important feature of Postman and helps to eliminate redundant tests. Parameters are enclosed in double curly braces {{parameter}}.Let us take an example of an URL:https://www.tutorialspoint.com/index.htm. We shall create a variable as URL then use it for parameterization of the request. ... Read More

How to create sessions in Postman?

Debomita Bhattacharjee
Updated on 18-Nov-2021 12:41:59
A session is a temporary fold that stores values of variables. They are used for the present instance and have a local scope. In Postman, we can modify the session variable value to share workspace among teams.Postman gives the feature of local session share. Even if a Collection can be shared among teams, the sessions are never shared. Different tokens have to be generated while a task is to be carried out in a team structure.A session has a local scope for a user within his Workspace and any modifications he makes shall not be reflected in the server. In ... Read More

Test and Collection Runner in Postman

Debomita Bhattacharjee
Updated on 03-Aug-2021 14:38:03
We can have checkpoints to verify the Response from a request. This is done by adding scripts in the Tests tab. These scripts get executed if the request has executed successfully.The scripts added under the Tests tab are developed in JavaScript. After a request has been sent and a Response is received, the outcome of these test scripts are reflected in the Test Results tab in the Response. The passed tests are marked ingreen and the failed tests are in red.Input the below tests in the Tests tab −tests["Status Code should be 200"] = responseCode.code === 200 tests["Response time lesser ... Read More

Disadvantages of Monitors in Postman

Debomita Bhattacharjee
Updated on 03-Aug-2021 14:34:35
Though Monitors in Postman have many features, it has some disadvantages as well. However, it is up to the end user if he should consider these features as drawbacks for Monitors.Disadvantages of monitors are listed below −Postman Monitors are non-functional provided the Postman server resides in the same server where we are. Thus it makes it difficult to determine the performance of a Collection in a different network.To solve this problem, we need to buy the Postman pro-version. On doing so, the Postman shall then give us another IP address with which we would be able to execute Monitors.Postman Monitors ... Read More

Analyzing Monitor Results in Postman

Debomita Bhattacharjee
Updated on 03-Aug-2021 14:32:11
Once a scheduled Collection Monitor gets triggered, we have to analyze the results. Click on the Monitor name available under the Monitors tab.A new window opens in the browser that shall redirect to the Postman account that we are signed in.If we analyze the performance graph of the API in the above image, we see the red bars which depict tests have failed for the request. A green bar points to the fact that tests have passed. On hovering on a particular bar, we shall get date, time, Response time and the percentage of test result for a particular run.Also, ... Read More

What are Postman Monitors?

Debomita Bhattacharjee
Updated on 03-Aug-2021 14:29:38
Postman Monitors are used to ensure that the performance and the Response obtained from an API are being maintained properly. Monitors are scheduled on a regular interval of minutes, hours or weeks for the entire day.The steps to create a Postman Monitor are listed below −Step 1 − Click on the arrow symbol to the right of the Collection name. Then click on the Monitors tab.Step 2 − Click on the Create a Monitor button.Please Note −  we have to Sign in to a Postman account in order to create a Monitor.Step 3 − Provide an input to the Monitor ... Read More

Assertions in Postman with Chai Assertion Library

Debomita Bhattacharjee
Updated on 03-Aug-2021 14:22:17
There are Assertions in Postman with Chai Assertion Library. Assertions are used to check whether the expected and actual results are the same. If not, an Assertion error is thrown with an error message.An Assertion returns a Boolean value. In Postman, Assertion is implemented in JavaScript. It is available in the Postman application automatically.In Postman, the Assertions are incorporated under the Tests or Pre-Request Script tab. The documentation of the Chai library is available in the link − https://www.chaijs.com/.Let us build an Assertion to verify if the text – Postman is present in an array.   pm.test["Text is present"], function(){   ... Read More
1 2 3 4 5 6 7 8 Next
Advertisements