![]() In this example we try to get a list of spaceships, so in the screenshot you can see: ![]() Then we can create a request, which will look something like this: Postman allows you to create collections to store requests, so the first thing we need is to create a collection, providing its name (required) and a description. This API does not need the user to authenticate, but if it did, we could save the username and password in the environment. ![]() The first thing we have to do before starting to create tests is to prepare an environment for the server in which the tests will be run. To create an environment we go to Manage environments → Add. Then we can start adding key-value pairs corresponding to variables that we will use multiple times in requests.Īs an example, I have chosen the following API to explain how it works: /api , so we are going to save it in a variable that we will call host: "The main objective of Postman is to help build APIs quickly allowing the agile creation of requests and workflows through collections" Environment The first program that we are going to use to achieve test automation is Postman, which can be defined as follows: The test automation is to use a program to control the execution of tests and check if the results are what we were expecting. To explain how to automate tests on an API, three programs will be needed: Postman, Newman and Jenkins. Test automation for an API: Postman, Newman and Jenkins What is test automation?
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |