Improve API Quality: Don’t Forget the GUI

Behind every mobile application, smart device, or The Internet of Things (IoT) there is at least one application programming interface (API). These API’s and the graphical user interface (GUI) are often interdependent on each other to collect information. For instance, let’s take an example of Yelp application. Here google maps API determines which nearby restaurants need to be shown on the mobile screen. Similarly, from the GUI, depending the information you type on the screen (Restaurants, Bars, Coffee places), the API generates a different search result.

The Challenge Of Only Recording GUI Actions

Most automated tools often allow you to record actions on the GUI, without giving you any insight into the API layer. This in turn can often result in the following challenges:

1. Increased False Defects

Without having an insight into the API layer, large number false defects are often reported. To demonstrate this, let’s take an example of an application with desktop, web, and mobile GUI, and each of these user interfaces make the same google maps API call to show information on the GUI. This looks something like this:

API-GUI Challange1

Let’s now assume at some point in time, the API layer stops working or gives the wrong data. Without having any insight into the API layer, the GUI tester would file 3 false GUI related defects – one for desktop, second for web, and third for mobile. This scenario looks something like this:

API-GUI Challange2

However, in reality, instead of three defects, only one defect that is for the API layer should have been reported. TestComplete 10.6 comes in real handy in such a scenario. With its integration to SoapUI, open source API testing tool, as well as SoapUI NG, functional API testing tool part of Ready! API family, TestComplete allows a GUI tester to find out if the issue is at the GUI or API layer. And as a result, false defects filled due to lack of insight into both the API and GUI layer can be drastically reduced.

2. Increased Steps For Resolution

Without having a single insight into GUI and API layer, a lot of back and forth often goes between different teams (GUI and API) to fix any issue encountered. The typical process could look something like this:

GUI Tester Steps1

The GUI tester finds a defect and then reaches out to GUI developer to fix the defect. However, while debugging the issue and finding the root cause, the GUI developer realizes the issue is at the API layer rather than at the GUI layer. As you can notice, additional step of going to the GUI developer can be easily avoided if the GUI tester had initially found out that the issue was at the API layer. The streamlined workflow could look like this:

GUI Tester Steps2

With TestComplete’s integration to SoapUI and SoapUI NG, when a defect is encountered, the GUI tester can easily know if the issue exists at the GUI or API layer. As a result, the GUI tester can reach out to the respective team (GUI/API) for faster resolution. Not only this, the reduction in the number of steps also gives the respective developer (GUI/API) greater time for analysis.

3. Lots of Back And Forth

Without an integrated GUI and API testing, whenever changes are made to the API tests, a lot of back and forth goes between GUI and API teams to reflect API tests changes into the GUI tests. TestComplete integration with SoapUI and SoapUI NG ensures that changes made to the API test cases are automatically reflected at the GUI level as well.

 Managing API Tests Can Become Challenging

As your testing grows, you would not only be writing API tests, but also other kinds of tests to ensure the front end of an application works as expected. Examples of these GUI tests could be TestComplete automated tests, Selenium, or even manual tests.  With time, it also becomes important to maintain traceability between the requirements written and defects raised in correspondence. With QAComplete integration to SoapUI and SoapUI NG, you can apply test management practices and establish traceability between requirements, different kinds of tests written, and defects raised, thereby ensuring proper API and functional GUI test coverage exists for requirements.

API Defectsnik

An ability to go beyond the GUI layer and drive automated tests at the underlying API layer through TestComplete and SoapUI/SoapUI NG integration can empower testers to quickly identify problems and reduce debugging time of defects. Additionally, the integration can also come in handy to reduce wait times between different testing teams by providing GUI testing teams instant accessibility to changes made to tests at API or service levels.

So try these integrations with TestComplete and QAComplete yourself!

Speak Your Mind

*