All case studies

From Flaky to Flawless

Rebuilding a Cypress automation pipeline from the ground up — from 80% flaky tests to a fast, trustworthy CI signal.

CYPRESS   GITLAB CI/CD FLAKY TEST ERADICATION  ON-DEMAND EXECUTION LLM EVALUATION
From Flaky to Flawless
OVERVIEW

Rebuilding trust in a Cypress automation pipeline.

The client is a leading demand and revenue management platform for the golf industry, trusted by over 800 courses nationwide, including many of the top public courses and multi-course operators in the country. Its product suite — waitlist management, booking confirmation, an AI pro-shop assistant, and lead management — helps golf course and resort operators automatically fill cancelled tee times, reduce no-shows, and deliver a better booking experience for golfers. The platform handles high-throughput, real-time automation across multiple chatbot integrations and AI-powered features, making quality engineering critical to product reliability and customer trust.

A case study in pipeline rehabilitation.
Key Metrics

The numbers.

80%→0%

HIGH/MED FLAKINESS ELIMINATED

70%↓

EXECUTION TIME REDUCTION

100+

AUTOMATION SCRIPTS

<5 min

CI PIPELINE DURATION

PROJECT AT A GLANCE
Client
Golf Tech / SaaS (name withheld at client’s request)
Industry
Golf Tech / SaaS
AI Coding Tool
Cursor AI
Website
Confidential (available on request)
Project Type
Automation Engineering
Automation Framework
Cypress (JavaScript)
Code Review
Greptile
Repo & CI/CD
GitLab
THE CHALLENGE

A fragile suite, a painful pipeline.

When the team joined, the Cypress automation suite was in a fragile state — the CI pipeline was slow, unreliable, and difficult to debug, making continuous delivery more painful than productive. Four interconnected problems needed solving.

01

Pervasive Test Flakiness

Over 80% of the Cypress test suite was flaky on arrival — including high and medium priority failures. Tests failed intermittently without code changes, making it impossible to trust CI results.

02

No On-Demand Execution

All Cypress tests ran only as part of deployment-triggered GitLab pipelines. The QA team had no way to trigger a test run independently — any manual validation required a code push.

03

No Failed-Test Rerun Mechanism

When tests failed, the only option was to re-run the entire suite from scratch. Without a Cypress Business plan, there was no built-in mechanism to rerun only failed tests — wasting CI minutes and slowing the development feedback loop significantly.

04

No Failed-Test Rerun Mechanism

When tests failed in a pipeline run, there was no way to rerun only the failing tests. The entire suite had to be re-executed, wasting time and slowing confirmation of fixes.

05

Slow CI Execution (12–15 Minutes)

The full Cypress CI job took 12–15 minutes per run. With frequent commits and pipeline-triggered execution, this delay slowed developer feedback loops and stacked up quickly.

WHAT WE DID

Stabilise, then build for speed.

The team tackled each problem methodically — stabilising the existing suite first, then engineering new pipeline capabilities, and finally expanding coverage and introducing AI tooling to raise overall quality velocity.

01

Flaky Test Eradication

A systematic audit of all 70+ Cypress scripts identified the root causes of flakiness: back-to-back deployments leaving the server unresponsive, data collisions in parallel runs, and fragile locators. By mid-February, all high and medium priority flakiness was eliminated.

02

On-Demand GitLab Pipeline

A configurable manual trigger was built directly into the CI/CD pipeline, allowing the QA team to execute the full suite on demand against any environment or branch — without needing a deployment event.

03

Custom Failed-Test Rerun Script

Without access to a paid Cypress plan, a custom rerun script was written to extract and re-execute only the failed tests from a prior GitLab run. One click now reruns only the failures and reports results immediately.

04

Execution Time Reduction

Pipeline count was increased and Gmail session logins were made reusable through shared session storage — the full CI job went from 12–15 minutes to under 5 minutes, a 70%+ improvement.

05

Pipeline Failure Monitoring & Triage

A dedicated Slack channel was set up to receive all CI pipeline failure notifications in real time — the team monitored, classified, and reported on every failure, distinguishing genuine failures from environment noise.

06

Automation Coverage Expansion to 100+

New Cypress scripts were continuously added for new product features — including the AI Assistant, Lead Management, Analytics, Booking Engine, and Admin Dashboard — growing the suite from ~70 to 100+ scripts.

Audit, rehabilitate, enhance.

The engagement moved through three focused phases — a diagnostic audit that mapped every flaky test and identified root causes, a systematic rehabilitation phase that eliminated all high and medium priority flakiness, and an enhancement phase that delivered execution time improvements, coverage expansion, and the bonus Testberry LLM evaluation platform.

Phase
Flakiness State
Pipeline State
Deliverables
Audit
80%+ high/medium flakiness across 70+ scripts
Deployment-triggered only; no manual trigger; 12–15 min runtime
Flakiness audit report; root cause identification; remediation priority list
Rehabilitation
High and medium flakiness eliminated by mid-February
On-demand manual trigger built; custom failed-test rerun script delivered
0% high/medium flaky tests; Slack failure notification channel active
Enhancement
~0% flakiness maintained
Under 5 min full suite runtime
100+ scripts; Testberry LLM evaluation platform delivered
Results & Impact

What the work delivered.

All high and medium priority flaky tests eliminated

from over 80% flakiness on arrival to zero high/medium priority failures, giving the team a trustworthy CI signal for the first time.

Full CI pipeline execution time cut from 12–15 minutes to under 5 minutes

a 70%+ reduction achieved through parallelisation, increased pipeline count, and shared session storage.

On-demand test execution capability delivered in GitLab

the QA team can now trigger the full Cypress suite against any environment or branch independently, without waiting for a deployment event.

Custom failed-test rerun mechanism built without a paid Cypress subscription

a bespoke GitLab-native script allows one-click rerun of only the failing tests, saving hours of re-execution.

Automation coverage grew from

70 to 100+ Cypress scripts, covering AI Assistant, Lead Management, Analytics, Booking Engine, Admin Dashboard, and additional modules.

A purpose-built LLM evaluation tool delivered

enabling structured A/B testing of AI chatbot accuracy with ground truth management, Slack integration, and a full run history dashboard.

Real-time pipeline failure monitoring via Slack

every CI failure was triaged, classified, and reported with root cause analysis and next steps, giving the client clear and actionable visibility.

TOOLS & TECHNOLOGY

The stack.

Automation Framework
Cypress (JavaScript)
AI Development Tool
Cursor AI
Code Review
Greptile
CI/CD & Repository
GitLab
Cypress Cloud
Dashboard, analytics, and parallel execution support
Communication
Slack (dedicated pipeline failure channel)
LLM Eval Tool
Custom-built AI tool — A/B chatbot testing & ground truth management

By addressing flakiness at its root, engineering custom tooling that worked within the client's existing subscription constraints, and delivering a purpose-built LLM evaluation platform on top, the team transformed a slow, unreliable CI environment into a fast, trustworthy foundation for continuous quality delivery.