u/Yaniv_Dev

What's the most valuable test in your suite — the one that actually caught a real production bug?

I've been thinking about test ROI lately. We all have suites with dozens or hundreds of tests, but if I'm honest, most of them just confirm that things still work the way they always did.

But every now and then there's that one test — the one that actually caught a real bug before it hit production. The one that justified the entire automation effort.

What's yours? What did it catch, and why do you think your other tests missed it?

I'll start: mine was a cross-layer integration test that verified data consistency between the API and the database. Every UI test passed, the API returned 201, but the DB had silently rejected the insert because of a CHECK constraint. Without that specific test, it would have looked like a perfectly green pipeline.

Curious what patterns come up — I'm guessing most "hero tests" are integration or E2E, not unit tests.

reddit.com
u/Yaniv_Dev — 18 hours ago
▲ 9 r/Everything_QA+1 crossposts

Built a 4-layer test automation ecosystem with 53 tests, MySQL integrity checks, and AI failure analysis — looking for honest feedback

Hey everyone,

I just finished a project I've been working on intensely — a multi-layer QA automation ecosystem that tests a financial expense tracking app across every layer of the stack. Sharing it here because I want real feedback from people who do this professionally.

What it covers (4 test layers):

  • Web — Playwright with strict POM (page objects hold locators only, zero logic), 10 tests including DDT from CSV, boundary testing, and data persistence checks
  • API — Full CRUD against a custom Flask backend + JSON Server, 14 tests including 5 DDT datasets, negative scenarios (missing fields, bad routes, deleted IDs)
  • Mobile — Android via Appium + UiAutomator2, 16 tests covering smoke, CRUD, DDT from JSON, boundary values, background persistence, keyboard interaction
  • Database — MySQL 8.0 (via Docker Compose) with SQLite fallback for local dev. Tests validate data integrity using Set Theory (new_set - old_set) and SQL aggregations

What ties it all together:

  • Cross-layer E2E tests — data entered in the Web UI is verified through API and then validated against the actual DB record. This is the part I'm most invested in — bugs at the seams between layers are what actually escapes to production
  • 12-step CI/CD pipeline — GitHub Actions spinning up a MySQL service container, starting Flask + JSON Server, running all non-mobile tests, generating Allure Reports, and deploying them to GitHub Pages with 20-version history
  • AI-powered failure analysis — Groq LLM integration that analyzes test failures and classifies root causes, triggered per-test via u/pytest.mark.use_ai or globally with --ai-analysis
  • Centralized DDT — CSV drives Web tests, JSON drives API and Mobile tests, each record filtered by test_id so the same data file serves multiple test scenarios
  • Custom Flask server — replaced json-server for the E2E/DB tests so that API calls actually write to MySQL, enabling real data integrity validation (not just mock responses)

Architecture (strict separation):

Tests → Workflows → Actions/Verifications → Page Objects + Data Layer

Every layer has one job: Page Objects hold only locator constants. Actions are u/staticmethod with u/allure.step. Workflows compose actions into business flows. Tests never call raw actions directly.

Some decisions I'd love feedback on:

  1. For the E2E database tests, I used Set Theory (capturing DB state before and after, then using set difference to isolate the new record). Is this approach common in production environments, or are there better patterns?
  2. The AI failure analysis adds ~2-3 seconds per failed test. Has anyone integrated LLM-based analysis into a real CI pipeline? Worth the overhead?
  3. I built dual DB support (MySQL for CI, SQLite for local) — the Flask server reads DB_TYPE from environment. Is this a pattern teams actually use, or is it overcomplicating things?
  4. Mobile tests are excluded from CI (require a physical device). What's the standard approach for running Appium tests in CI? Emulators? Cloud device farms?

The numbers:

Layer Tests Highlights
Web 10 CRUD, DDT (3 datasets), boundary, reload persistence, AI analysis
API 14 CRUD, DDT (5 datasets), negative (missing fields, bad route, deleted ID)
API ↔ DB 6 Create/update/delete reflected in DB, set theory integrity
Mobile 16 Smoke, CRUD, DDT (4 datasets), negative, boundary, background, keyboard
Cross-Layer E2E 3 Web UI → API → DB, negative amounts blocked by MySQL CHECK constraint
Total 53 9 test files across 4 layers

Context:

I'm a QA Automation bootcamp graduate transitioning into the industry. This was my capstone project. I deliberately went deep on architecture and cross-layer validation because I wanted to understand how data flows through a system — not just write tests that pass.

GitHub: Financial-Integrity-Ecosystem

Not looking for a pat on the back — I want to know what's missing, what's naive, and what would make someone reviewing this in a hiring context actually stop and look.

Thanks.

u/Yaniv_Dev — 4 days ago