General Forum
Best Practices for Automating End-to-End Testing in SaaS Applications - Printable Version

+- General Forum (https://generalforum.net)
+-- Forum: Category (https://generalforum.net/Forum-Category)
+--- Forum: Science & Technology (https://generalforum.net/Forum-Science-Technology)
+--- Thread: Best Practices for Automating End-to-End Testing in SaaS Applications (/Thread-Best-Practices-for-Automating-End-to-End-Testing-in-SaaS-Applications)



Best Practices for Automating End-to-End Testing in SaaS Applications - Alok - 11-04-2025

[attachment=42]
Hi all,
I’m working on a SaaS architecture that consists of microservices, APIs, a frontend in Next.js + TypeScript, and a PostgreSQL backend. We’re moving away from storing tokens in local storage and instead using Http Only cookies based frontend. We’re also migrating to automated testing — not just unit/integration tests, but full workflow validation.
In this context, I’ve found that end-to-end testing is the key piece to tie everything together: validating the UI, API interactions, database state and external dependencies in a single workflow. I came across a robust guide on this topic (link at the end) and would like to share some lessons + invite feedback from folks who have done this.
Key considerations I’ve encountered:
  • Mapping critical user journeys: login → dashboard load → action trigger → backend API → DB update → UI refresh
  • Isolating external services: stubbing third-party APIs so tests run reliably and fast
  • Data-reset strategy: using Docker Compose to spin up a fresh database instance for each test suite
  • CI/CD integration: ensuring that these workflows run on every merge and deployment
  • Dealing with flaky tests: asynchronous calls, eventual consistency, timing issues
Questions for the community:
  1. What frameworks or tools do you use for managing end-to-end tests across microservices?
  2. How do you handle dynamic data and state validation in workflows that span multiple services?
  3. How many end-to-end tests do you aim for relative to unit or integration tests (percentage or count)?
  4. What strategies have you found effective for reducing flakiness in long workflow tests?
Happy to share our implementation details (we’re using Playwright for frontend + Go backend tests + Docker-based test DB) if someone’s interested.
Thanks for any insights!