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

核能气质少年 提交于 2020-01-03 17:25:09

问题


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.


回答1:


Instead of going into a long explanation, where you can find volumes written on the Internet, let me give you a couple of additional keywords. For UI testing, also look at FUNCTIONAL and EXPLORATORY testing. For API, also look at UNIT and AUTOMATED testing.

I find this resource useful http://www.stickyminds.com/testandevaluation.asp?Function=FEATUREDETAIL&ObjectId=17275

Pick the one your boss will give you a promotion for.




回答2:


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




回答3:


Testing at the API layer enables the robust, low-noise regression tests that are essential for continuous testing. It also helps you zero in on problems that might not be evident from the UI level — for example, an error in writing the expected values to the database.




回答4:


GUI Testing--testing on visible elements in pages or screens called as Gui testing.some other names to GUI are Sites testing/ front end testing/ screens testing.

API testing--Testing on invisible services functionalities called as API testing. other names to API are Services testing/ middleware Testing/SOA testing.

End-to-End Testing--testing related to integration of a site and a service is called as End-to-End testing. other names are Inter System testing/ interoperability testing.




回答5:


In few words:

UI testing is testing between users (humans :-) in most cases) and front end or client side 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.



来源:https://stackoverflow.com/questions/9525814/whats-difference-between-ui-level-testing-and-api-level-testing

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!