Project, quantitative tooling

A mathematical optimization problem hidden inside a test pipeline

CI Shard Advisor is a public tool that recommends how to split a Cypress suite across CI containers, with the time and cost of each option. The point isn't that CI gets faster. It's that a QA infrastructure problem can be stated as a mathematical model, checked against how production workers really behave, and turned into runtime and cost trade-offs a team can choose from.

Type
Web tool that runs in the browser
Input
Cypress run reports, one per container or merged
Tested with
Property-based, metamorphic and invariant tests
Privacy
Reports never leave the browser
CI Shard Advisor showing a 3-container setup and the suggested moves

The brief

At IriusRisk the end-to-end suite ran in one CI container per product module. I stated the split as an optimization problem: given the duration of every spec and a fixed setup cost per container, assign specs to containers so the slowest one finishes as early as possible, and weigh that against what each extra container costs.

The first model assumed one worker per container. Production used 5, so I simulated how Playwright schedules specs across workers and modelled that too. With the workers in the model, 4 containers instead of 7 came out about 8% faster and 41% cheaper. The CI containers case study tells the whole story.

What I built

A browser tool that takes the same idea to any team using Cypress. It reads run reports, measures the current setup and recommends how to rebalance the specs or change the number of containers, with the feedback time and the cost per run of each option. The reports never leave the browser.

How I tested it

For most inputs nobody knows the optimal split in advance, so there is no perfect oracle to compare one output against. The core is tested on what must hold instead, with property-based, metamorphic and invariant tests.

Contact

I'm Pedro Morago, a Senior QA Engineer with a Mathematics degree, working remotely from Spain. If you'd like to talk about CI pipelines or test tooling, email me at pedro@pedromorago.com.