I'm looking for advice on how to integrate automated testing into our CI/CD pipeline without causing delays. We have a solid setup using GitHub Actions, Docker, and Kubernetes, but our testing is primarily manual. I've experimented with Selenium and Playwright for UI tests, but they significantly slow down our deployments. Currently, we only run unit tests automatically; everything else is validated manually before release. I'm interested in how others efficiently automate regression or end-to-end (E2E) testing. What strategies do you employ to maintain both speed and reliability without sacrificing deployment frequency? Are there effective practices like parallelization, orchestration of test environments, or the use of separate pipelines for different types of tests that I should consider?
5 Answers
In our experience, we use a lightweight record-and-replay tool for UI regression tests. We prefer BugBug since it's no-code and allows our QA team to maintain tests without messing with CI logic. These tests run in parallel on a dedicated environment and only start after unit tests are verified, so they don’t delay deployment.
If you're dealing with a larger project, full UI test suites can definitely take hours, regardless of optimization. It’s best not to block deployments on these. Instead, run a smaller smoke test set before merging, and run the comprehensive suite nightly for results without slowing down the development cycle.
Parallelization and test environment orchestration are key. Having separate pipelines for different test types keeps the main workflow speedy.
You can distribute UI tests across multiple machines, which can alleviate slowdowns unless your app gets exceptionally large. Also, consider running the slower tests only on merges to master and not blocking pull requests. Just cultivate a culture of rolling back commits when tests fail post-merge.
Using Playwright with Docker in GitLab CI has worked wonders for us. We run tests in parallel shards and initially took some time tuning it, but now our entire suite finishes in about 10 minutes!

Related Questions
How To: Running Codex CLI on Windows with Azure OpenAI
Set Wordpress Featured Image Using Javascript
How To Fix PHP Random Being The Same
Why no WebP Support with Wordpress
Replace Wordpress Cron With Linux Cron
Customize Yoast Canonical URL Programmatically