![]() ![]() We will continue on more advanced tests and postman functions in a next part. When this is done hit on Send button again and execute your first test. So in order to add tests, go to “Tests” in request section of application and add this few lines : In this case I use 2 seconds just for example it might be greater or lower number, but 7 seconds is usually a maximum time for request execution. If it will be executed slower then for 2 seconds, our test will fail. Another test we will add for response time < 2 sec in order to understand how fast request was processed by server. We will try to add two tests for response code in order to know that our request was successful. Now let’s try to write our first test and execute request again. As we have successfully executed our first request. After that we have a whole bunch of planets in a list called “results”. You should see something like this in response :Īs you can see a response status is 200 OK and response time is 1290 ms(1.29 sec) and we have 61 items in our collection (61 planets in Start Wars universe). Type in “” in to “Enter request URL” field and hit Send. But we will come back to environments later and now let’s run our first request using Postman. Also we have environment dropdown at the right top corner of application. In general, when we submit a POST request, we expect to have some change on the server, such as updating, removing or inserting. This is a part that we will work the most from now on. We use this method when additional information needs to be sent to the server inside the body of the request. In a middle we have a dropdown that has a request type, URL and “Send” button. So what do we have here? On a left hand side there is a column with all your saved collections(test sets). You will see something like this when you are ready to use application : So lets get started.įirst of all install Postman application (links for each OS is above) and sign up or log in into application. To show you most basic functions of Postman we will use The Star Wars API this is a simple API that returns a data for all characters, planets and many more from Start Wars universe. ![]() APIs are the foundation of modern-day software. Discover our programs designed to promote API literacy amongst students and educators. In order to show how to use Postman you will have to download a postman application which is available for Mac OS, Windows x32, Windows 圆4, Linux x32, Linux 圆4 and as a Chrome plugin. Postman Student Programs 1,007 followers on LinkedIn. As you will get some new approaches that can be used in order to quickly write and validate you API. This series will be useful for developers as well as for QAs. Postman becomes more and more popular tool for API so we decided to do a small series of posts on our experience and best practices on how to use this tool for API testing. Postman Flows is free to use for up to three users in our Free plan. How to use Postman for API test automation. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |