QA Fundamentals · Middle · Question 37 of 75
Why test the API directly instead of only through the UI?
- 1The UI can't call the API, so it can't be tested
- 2API tests also check the visual design of the app
- 3It's faster, more stable and reaches cases the UI can't
Show the answer
Correct answer: It's faster, more stable and reaches cases the UI can't
Explanation
Direct API tests can send invalid data the UI would block, check status codes and error bodies, and run in seconds. The UI can add its own validation and hide server bugs.