🔀 I3 · Hybrid Power: Set Up with API, Verify in UI
I3 · Hybrid Power: Set Up with API: Hybrid testing is one of GROUP I's (and this page's) most powerful ideas: instead of CREATING a bug FROM THE UI (fill a form, click a button —
Hybrid testing is one of GROUP I's (and this page's) most powerful ideas: instead of CREATING a bug FROM THE UI (fill a form, click a button — SLOW and FRAGILE), you create it directly FROM THE API with `request.post(...)` (FAST and RELIABLE), then ONLY VERIFY in the browser the thing you actually want to test (that the bug appears in the list). This is like a theater rehearsal: instead of PLAYING every scene start to finish, you turn the LIGHTS ON only for the SCENE you want to test — the rest of the set (10 bug records) is built with the API in SECONDS. So why not build EVERYTHING through the UI — wouldn't that be more "realistic"? Because creating 10 bugs from the UI takes minutes and carries a break risk at EVERY step (if one button shifts, the WHOLE test collapses); yet the test SCENARIO's goal is usually to see "the listing feature works correctly", NOT "the bug creation form" — that was already tested separately in B6/C4/D3. The Java equivalent is directly INJECTING test data into the database in a Selenium test (like an `@Sql` script) — here the API is the RELIABLE, contract-compliant (GROUP F) version of that "fast data setup" layer. **For deep Playwright UI automation → see the `/playwright` page.**
🎬 Set Up with API, Verify in UI
Bug created (id: 99)
Only navigate to the list
THE SLOW PATH: creating 10 bugs from the UI — each one filling a form + clicking + waiting, taking minutes and being FRAGILE.
THE FAST PATH: the SAME data is created in SECONDS with `request.post(...)`, WITHOUT touching the UI at all.
A real `bug` object (id: 99) is obtained from the API response — the test data is READY.
ONLY NOW does the browser open — `page.goto(...)` navigates DIRECTLY to the bug list, setup steps are SKIPPED.
The lesson — the test verifies ONLY the thing actually under test (the bug appearing in the list); setup happens via the FAST, RELIABLE API, verification happens via the REAL user experience (UI).
The Order for Building a Hybrid Test
Set up with the API…
Quickly create the needed data (a bug record) with request.post(...).
Navigate straight to the target…
Skip unnecessary UI steps and go straight to the page under test with page.goto(...).