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.
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
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With