Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's difference between UI level testing and API level testing?

I got this question while interviewing some companies. I don't think I answer the question well. However, based on my understanding:

The UI level testing is more about the what end user will see and would be better to use for acceptance testing.

The API level test is good for performance testing, since it's easier to simulate multiple users to access the resource at the same time. And, it's easier to look at where the problem will be.

Can anyone give me more detail about that? And when should we choose to use which type of testing?? Thanks a lot.

like image 225
user836112 Avatar asked Feb 21 '23 06:02

user836112


2 Answers

UI stands for User Interface. UI allows the user to interact with the application.

UI testing refers to testing graphical user interfaces, such as how user interacts with the application, testing application elements like fonts, layouts, buttons, images, colors, etc. Basically, UI testing concentrates on the look-and-feel of an application.

For more details on API testing, see:

http://www.guru99.com/gui-testing.html

API is an acronym for Application Programming Interface. API enables communication between two separate software systems. A software system implementing an API contains functions/sub-routines which can be executed by another software system.

API testing is checking API of a Software System. In order to check the API , it needs to be called from the calling software . Necessary test environment, database, server, application setup needs to be prepared before doing API Testing.

API testing is focused on the functionality of the business logic (such as a calculating total price) and it is entirely different from UI testing. It mainly concentrates on the business logic layer of the software architecture. This testing won’t concentrate on the look and feel of an application.

For more details on API testing, see:

http://www.guru99.com/api-testing.html

Eric

like image 157
Eric Elahi Avatar answered May 02 '23 03:05

Eric Elahi


In few words:

UI testing is testing between users (humans in most cases) and front end or client side (aka presentation logic) of the application such as a browser.

API testing is testing between backend or server side of the application (aka business logic) and backend of another application.

like image 27
Fouad Boukredine Avatar answered May 02 '23 04:05

Fouad Boukredine