End-to-end API testing flows can involve multiple input sources, such as HTML, Databases, Telnet/SSH, Mobile, Shell, Data files, other RESTful APIs and more. TestProject‘s test automation platform allows not only testing your APIs manually, but also to complete end-to-end API based test automation flows, schedule and run them periodically, get execution reports and all of that without any third party tools and without a single line of code 🚀
This hands-on tutorial consists of step-by-step examples and real automated test flows, shared here for you to use and practice while automating your APIs. In this chapter (Chapter #2), we will walk through API test automation flows combined with mobile functional tests. You can access the tests mentioned in the examples below by using the following shared test links:
Table of Contents – Automating End to End API Testing Flows
- Overview – Automating End to End API Testing Flows
- Chapter 1 – Basic API Test Automation
- You’re here → Chapter 2 – API Test Automation Flows Combined with Mobile Functional Tests
- Chapter 3 – API Test Automation Flows Combined with Databases Flows
- Chapter 4 – API Test Automation with Combination of Shell Commands and Local Files
- Chapter 5 – Advanced API Test Automation and Validation Flows
- Chapter 6 – Scheduling API Automation Flows and CI/CD Execution
Android Mobile Functional Test and RESTful API Test Example
API calls are not limited to web testing only, they can be performed during mobile testing (both Android and iOS tests) as well, as part of your end to end automation flow.
The following example will perform a GET request to the public MetaWeather API and create an alarm with a label extracted using JsonPath from the response.
First, create the HTTP Get request:
And store the value in a parameter:
Afterward, use your extracted value when necessary in your test:
iOS Mobile Functional Test and RESTful API Test Example
The same can be achieved for iOS tests, creating API requests and using them in tandem with your functional tests.
The following example once again queries the MetaWeather API, extracts city names using JsonPath and writes them all down inside a reminder note on an iOS application: