Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

trivago tech 6 min read Case study mediumAdept

Recycle your tests: many shades of green

trivago reuses a small subset of its existing Selenium/Cucumber end-to-end scenarios (via its internal framework trupi) for three extra jobs by adding Gherkin tags rather than new test code. The jobs are synthetic monitoring of production every 10 minutes across three GCP regions with Slack alerts, collecting lab-style RUM metrics (CSS/JS/image sizes, GraphQL call counts) after each release, and checking stage stability after backend changes. Running so many tests against stage degraded it, so the lesson is to reuse selectively. Recyclable tests share a few traits: configurable targets, no side effects, safe repetition, meaningful assertions, visible failures, and a small, fast footprint.

Assumes: end-to-end testingCucumber/Gherkin tagsCI pipelines

Related posts

  • How we migrated our acceptance tests to use Synthetic Monitoring

    Datadog Engineering mediumAdept

    Datadog's Frontend Developer Experience team replaced a flaky, hand-scripted Puppeteer acceptance test suite (565 tests, 100k lines, 6 CI jobs, 35 machine-minutes per commit) with recorded Synthetic Monitoring tests run from CI via a new CLI, synthetics-ci, later generalized into datadog-ci. The CLI discovers *.synthetics.json files, applies config overrides, triggers tests, polls result IDs and prints readable output. The year-long migration across 300 engineers in one monorepo relied on documentation, presentations, hands-on help for the heaviest test owners, a non-blocking CI job that posted failures as PR comments, and per-test Jira tracking before the pipeline was made blocking.

  • End-to-end test probes with Playwright

    Zalando Engineering mediumAdept

    Zalando turned its end-to-end tests into production probes: a small set of Playwright scenarios covering critical customer journeys runs every 30 minutes and pages on-call when it fails. The trigger was an incident in which bad headless CMS content broke React hydration on product pages, which neither the Cypress pre-release tests (about 95% reliable after hardening) nor existing alerting caught. Playwright's auto-wait, web-first assertions, fixtures, expect.toPass retry loops and :visible pseudo-class selectors made the simplified tests resilient. The tests first ran for a few weeks in a low-priority email-only 'shadow' mode to remove flakiness, and after paging was enabled they fired only once, during a real outage. The main advice is to keep probes focused on critical journeys, write good selectors, and iterate in shadow mode before paging.

  • How we raised mobile end-to-end test stability to 98%

    Shopify Engineering mediumAdept

    Shopify rebuilt its mobile end-to-end test framework as an opinionated wrapper over Appium, raising test stability from 50% to 98% and returning the suite to blocking PR checks. The wrapper exposes a small builder-style API where every action must carry an assertion that is validated as false before the step and true after. Escape hatches like custom timeouts and Test IDs are prefixed UNSAFE_. Elements are located visually rather than through the view hierarchy: PaddleOCR finds text, and OpenCV matches grayscale Polaris SVG icons, including color-inverted variants and multiple sizes, using adjacency to tell duplicates apart. Annotated run videos, a single CLI for local and remote device-farm runs, and a pre-promotion gate that reruns new tests before admitting them to CI round out the approach.

  • Monitor your CI performance using Sentry

    Sentry mediumAdept

    Sentry's tracing model can represent GitHub Actions workflows as traces, with each job's steps as spans, so slow steps and run-to-run variance show up the same way they would for an API request. Applied to the Sentry .NET SDK's macOS build job, it showed the Build step taking about 44 of 83 minutes. Better caching across runs and parallelized tests cut the job to about 24 minutes, a 71% reduction, and custom dashboards tracking p50/p90 showed overall workflow runs about 64% faster. Setup takes a Sentry project, a private `.sentry` repo with a `sentry_config.ini` holding the DSN, and an experimental GitHub App that reads Actions metadata. Ingested jobs count against your span quota.

  • Infrastructure Observability for Changing the Spend Curve

    Slack Engineering mediumAdept

    Slack bent the growth curve of its webapp CI spend, which had been rising about 10% month over month, by using observability (dashboards, metrics and tracing) to drive three changes. Adaptive capacity standardized instance types and oversubscribed executors per instance after profiling vCPU and executor-count combinations, cutting costs about 70% and error rates about 50% while targeting 50% busy executors at peak. Circuit breakers in the Checkpoint orchestrator defer or cancel CI work when downstream services such as Jenkins, Vitess, Flannel or Search degrade, which stops cascading failures. Tracing the Cypress test runtime exposed runtime variables tied to flakiness, which had been burning roughly 90k compute hours a week.

The quest for software engineering knowledge.

Look:
Layout: