In this blog series, I will help you become an accomplished API automation engineer. Last post we installed and started up the SoapUI application. Part 2 is about getting to know SoapUI and creating your first project.
Creating a SoapUI Rest Project
For this tutorial, we are going to use the Pokemon API. https://pokeapi.co/
- Click the Rest Button on the toolbar
- When the “New Rest Project” window appears, enter “http://pokeapi.co/api/v2/” into the UI field. Then click “OK”.
- You have now created a Project. It should look something like this in the left nav.
- Hit the “Save All” button. This will save your project as an XML file.
Project: The project is the container for your Rest Services, Resources, Methods, and Requests.
Rest Service: The Rest Service is the domain where you rest request is generated from. For our project, all calls will come from the “http://pokeapi.co” domain.
Resource: The Resource is the path to the API call. This is the part of the API call that will change based on what you are calling.
Method: The Method is the type of call that is being made. Options include Get, Put, Post, and Patch. We will only be dealing with the Get method for this tutorial.
Request: The Request is the full Rest Service + Resource + Data that you are passing to the API call. Sometimes the call may take no data, but usually, the call takes some data to get a specific return.
The API call
If you are not familiar with how Rest API calls work, that is ok. You will get a hang of it as we work through the tutorial. Let’s break down that API call again.
For the API call “http://pokeapi.co/api/v2/pokemon/1/” we can split it up as follows:
Rest Service: http://pokeapi.co/