# API testing vs browser testing

> Diagnose a missing order using the server response and the rendered list. Decide whether an API check, browser check or both will expose the defect.

Source: https://cueapril.com/compare/api-vs-browser-testing
Updated: 2026-12-01
Index: https://cueapril.com/llms.txt

## Should this workflow be covered at the HTTP boundary, through the user interface, or both?

Choose an API test for response structure, permissions and state transitions available at the HTTP boundary. Choose a browser test for interactions and rendered results that users rely on. If the failure could occur in either layer, use one known fixture so a response and a screen capture tell a coherent story.

Choose an API or browser test for a missing order. Compare the server response with the rendered list and put the assertion where the defect becomes visible.

Cue April editorial assessment. The sources identify documented capabilities. Suggested pilot checks are evaluation criteria.

## Trace a missing row from response to screen

Seed three orders, two of them open. Request the open-orders endpoint and compare its IDs with the fixture. Next apply the matching filter in the browser, wait for the rendered result and read the two visible IDs. If the response has both and the page displays one, the browser evidence narrows the investigation to what happened after the response.

API testing vs. browser testing

| Question | API evidence | Browser evidence |
| --- | --- | --- |
| Did the filter reach the service? | Request parameters and filter response | User action and recorded request |
| Can this role see both orders? | Returned IDs for the role | Visible rows under that account |
| Did pagination hide one record? | Page data, counts and continuation values | Rendered navigation and the next page |
| Did a styling change break the control? | The endpoint can still respond correctly. | An actual user can locate, operate and read the filter. |

## Preserve the independent expectation

Use known order IDs or a fixture manifest as the expected set. Comparing the UI only with the last HTTP response can let the same server error pass both checks. Include the signed-in role, pagination settings and application build in the report so another engineer can reproduce which collection the user should see.

## Primary documentation

- [Playwright API testing](https://playwright.dev/docs/api-testing)
- [Playwright assertions](https://playwright.dev/docs/test-assertions)

By Cue April. Updated 2026-12-01.

## Related

- [Testing comparisons](https://cueapril.com/compare): Compare testing tools and methods against a release decision. Inspect the required evidence, maintenance work and checks each approach can provide.
- [API testing](https://cueapril.com/testing/api-testing): Automated API testing with approved assertions and schema campaigns. Inspect response checks, failed cases and the exact scope behind each result.
- [Playwright testing](https://cueapril.com/testing/playwright-testing): An AI testing agent runs your approved Playwright tests and keeps the results, source identity and gaps. Review accessibility scans alongside journeys.
