Skip to main content

Do you start testing from the UI or the API?

  • March 19, 2026
  • 0 replies
  • 6 views

IOan

A few years ago, I was proud of a UI automation suite I built.

Hundreds of tests.
Clean reports.
Everything green.

Until production started failing.

Users reported errors we had never seen.

But our UI tests were still passing.

So I went deeper.

Instead of clicking through the UI, I started testing the APIs directly.

That’s when things became obvious:

• The API returned inconsistent data
• Some responses were missing critical fields
• Error handling was completely broken
• Edge cases were never validated

The UI was masking all of it.

It handled errors silently.
It retried requests.
It hid failures behind “friendly messages.”

Our UI tests were verifying the illusion of stability.

Not the system itself.

That changed how I approach testing.

Now I start with APIs:

→ Validate contracts
→ Break requests intentionally
→ Test edge cases early
→ Then verify UI behavior

Because if the foundation is broken…

Testing the surface won’t help.

Do you start testing from the UI or the API?