Close

Why Application Program Interface (API) is above Graphical User Interface (GUI)?

It’s been a long time since I have heard this tagline “API ABOVE GUI “ from many official testers within my friend circle and others .When I put some effort in realizing the fact behind this, I came across 2 reasons:

1)Agile practises
2)The Internet of Things .

Agile practises
With Agile development becoming the standard in most organizations, the ways in which we develop software and automate tests have changed dramatically. Graphical User Interface (GUI) tests that go against a user interface tend to take longer to run. During certain Agile practices like continuous builds, the amount of time it takes to receive feedback from a GUI regression suite of tests when new code is checked-in is too long. In those cases, quicker feedback is needed. Agile has also increased the frequency with which applications are released, which in turn has created an increased demand for new ways to quickly test them. GUI tests are typically too slow to get the test coverage we need during, say, a typical two-week sprint. Also, since Application Program Interface (API) tests don’t rely on a UI to be ready, they can be created early in the development process.

The Internet of Things
The second change that is causing a shift towards API testing is the Internet of things. The Internet of Things is an everyday object with embedded functionality that allows it to talk over the web using HTTP or HTTPS to communicate with remote backend services.

Basically, more and more things will begin to have sensors embedded into them. The other day I saw a video of Enchanted Objects: Design, Human Desire, and the Internet of Things author David Rose being interviewed by John Stewart, who showed a medication “glow” cap, that will tell you when to take your medicine by blinking or texting you so that you don’t forget. This is just one minor application, but I’m sure you can imagine the endless possibilities for this type of technology.
So most of the applications are without a definite traditional user interface .

So how do we test this?

This came with the result of API headless testing.

Web-Services-Testing

An API specifies how its software components should interact with each other. APIs can be created using a whole host of different technologies. APIs help facilitate communication between a client and a server. We are likely to be testing HTTP/HTTPS- based APIs where communication is done over the web. For example, say we have an internet scale that has an app that makes a request and receives a response from a backend service.

java-script-unit-testing

The benefits run over GUI platform as because of following:

Time effective:
If we are testing for a core functionality under a tight deadline we can often go for API.
For example, we executed 30,000 automated tests in a case study. It took 50 hours for GUI completion whereas took 8.5 hours in API.

Language Independent:
Data is exchanged through JSON or XML, so any core language can be used for automation .

Easy GUI integration:
Pursuing GUI after API, always give a perfect outline for the GUI stuffs.

Test Core Functionality:
Testing core functionality allows to access small errors, evaluate build strength, test in tandem with development, Improved test coverage and so on.

This in turn leads to faster release, conserved resources & advantageous in-house or off shore QA.

Latest stories

  • How Kerala’s IT Sector Braces To Fight COVID-19?

    In India and around the world, the impact of the coronavirus pandemic is evident across all sectors of the economy.  With  COVID-19 spreading rapidly around the world, the pandemic has not only affected the lives of hundreds of thousands of people but also demonstrated a growing impact on the global economy. From companies chalking out […]

  • How a DevOps Approach Helps To Meet Deadlines Every Time ?

    Missing a deadline never feels good!  Despite designing perfect workflows from start to finish, we often found our teams chasing deadlines until the very last moment. This upsetting trend led us to a quest to find out what obstacles prevented our teams from getting work over the finish line in time. The biggest factors contributing […]

  • Can You Fuel The Next Wave of Business Growth During a Pandemic?

    Pandemics and economic recessions are known to create disruptive effects on global economies and businesses. For e.g, the Black Death was a devastating bubonic plague that arrived in Europe during 1347. The catastrophe resulted in the collapse of the feudal system in Europe while replacing it with a more modern employment contract.  Covid-19 pandemic has […]

Leave a Reply

Your email address will not be published. Required fields are marked *