CI/CD & Quality Assurance · 2 hours · online
How can we know whether code is actually tested and ready for production, and keep delivery confidence, when the same product runs with several tiers, regions, integrations and configurations?
By the end of the session, participants should be able to measure the effectiveness of a test suite beyond coverage, select representative configurations from a large configuration space, compose a layered test portfolio with reviewed AI-generated cases and plan a rollout by rings with verifiable stop and rollback criteria.
Workshop 2 ended with a flag lifecycle policy and a Variant Debt Record. Each flag that stays on doubles the number of configurations the product can run in, which is the starting point of this session.
In Workshop 2 the case repository had 40 flags, 12 of them on for more than six months. Answer in the chat in one sentence: which of those flags would you still have to test in both states today, and why.
Options: less than 20%, 20 to 40%, 40 to 60%, more than 60%, or "we do not know". The last option is a legitimate answer, and the session returns to it when it discusses root cause analysis.
Line coverage reports which statements ran during the tests. It says nothing about whether a test would fail if those statements were wrong, which is the property that matters before a release.
The tool changes the code in small ways, such as < into <= or a constant into its neighbour, and runs the tests. A mutant that survives points to behaviour that no test pins down. The mutation score is the share of mutants killed.
Exclusions in tools such as SonarQube remove paths from the coverage figure. They are useful for generated code and dangerous when they cover rules, adapters or anything with business logic, because the headline number stays high while that code goes unmeasured.
For each bug that reached production, the useful question is which layer would have caught it: unit, property, contract, isolation, migration or a rollout check. The answer tells the team where to invest, and it is often not the unit layer.
Assistants can generate tests, suggest mutants and triage failures quickly. A generated test is code that someone approves, so it goes through the same review as any other change.
Drafting boundary cases from a written rule, proposing contract tests from an API schema, suggesting mutants for a function under review, grouping failed runs by probable cause and summarising a long log for the person on call.
Assertions that repeat the implementation instead of the specification, tests that pass without checking the expected behaviour, equality on floating-point money, fixtures with one configuration only, and test data copied from production with customer information.
def test_tax():
assert tax_minor("co-andes", 150) == round(150 * 0.19) # restates the code; never compares with the ruledecimal.Decimal, and runs it over many generated amounts.Each new factor multiplies the number of configurations. Testing all of them stops being possible long before the product feels complex to the people who build it.
| Factor (Tradeline) | Levels | Count |
|---|---|---|
| Tier | basic, plus, premium | 3 |
| Region stamp | br-south, mx-central, co-andes, za-north | 4 |
| Integration | app-only, erp-connector, orders-api | 3 |
| Data mode | shared-pool, dedicated-silo | 2 |
| Optional features | credit limit, loyalty, scheduled delivery, split payment (on/off) | 2⁴ = 16 |
| Total | 3 × 4 × 3 × 2 × 16 | 1,152 |
Empirical studies summarised by Kuhn, Kacker and Lei (2013) found that the large majority of failures in the systems studied were triggered by the interaction of one or two factors, and that very few required more than six.
A pairwise covering array contains every pair of levels of every two factors at least once. For this space, 12 to 16 configurations cover all 173 pairs.
When variation is resolved at runtime, one build serves every configuration. The pipeline then tests and promotes one artifact, and the configurations become test inputs instead of separate builds.
One commit produces one artifact. No per-customer branch or per-region build.
The same binary or image goes to every environment. Only configuration changes.
Tier, region and features are read from tenant records and policies, and are versioned.
The artifact moves through stages; each stage adds evidence instead of rebuilding.
Signed provenance shows which source and which build produced what runs in production.
Humble and Farley (2010) describe the deployment pipeline as the path that every change follows, with the principle of building the binary only once and promoting it through the stages.
SLSA, from the OpenSSF, defines levels of assurance for build provenance, so that a team can show that the artifact in production came from the reviewed source.
End-to-end tests are slow and brittle, and one per variant does not scale to a thousand configurations. Cheaper layers carry most of the coverage, and end-to-end tests check a few critical journeys.
| Layer | What it protects in a configurable product | Tradeline example |
|---|---|---|
| Property | Rules that must hold for any input of a policy | Tax rounded half up for any amount; minimum order is inclusive in every region |
| Contract | The agreement between a producer and each consumer, run on both sides | The ERP invoice amount equals the order total, whatever the payment parts |
| Tenant isolation | No data, cache or quota crosses tenants in the shared pool | A query with tenant A's context never returns rows of tenant B |
| Migration | Old and new application versions work with the schema during a deployment | Version N-1 still writes orders after migration N runs |
| End-to-end | A small number of critical journeys | Order with a delivery slot, paid in two parts, in Brazil |
Some defects only appear in production, with real tenants and two versions running at once. Rings limit how many tenants a defect reaches, and compatibility rules let old and new versions coexist.
Internal tenants first, then a cohort chosen by stamp, tier or integration, then the rest. Each ring has an entry criterion, an automatic verification and a stop criterion measured on that cohort.
A stamp serves a group of tenants or a region. A release can move stamp by stamp, which limits the blast radius and gives natural rings.
APIs and schemas change with expand and contract steps and a dated compatibility window. Stripe pins each consumer to a version and translates between versions in the server.
The orders service of Tradeline reports about 90% coverage and passes the quality gate. The facilitator runs the steps below live and makes each decision explicit.
Coverage around 90%, quality gate green, new code above 80%.
About 1,300 mutants and a score close to 40%. Most survivors sit in pricing and regional rules.
sonar.coverage.exclusions removes regional rules and adapters from the figure.
A small example with four factors, generated with a combinatorial testing tool.
Pairs covered by the set against the configurations of the nightly suite.
# Added in PR #4471: "exclude per-market config from coverage, it is just data" sonar.coverage.exclusions=src/orders/rules/regional/**,src/orders/adapters/**
Groups of five or six participants in breakout rooms, for 40 minutes. Roles rotate at every workshop, so check who held each one in Workshop 2.
Keeps the discussion on the deliverable and decides when to move on.
Fills the templates on the board or in the shared document.
Ends Part 1 at 15 minutes and Part 2 at 40.
Asks for the evidence behind each claim and each configuration.
| Download | Used in |
|---|---|
bugs-pack.zip | Part 1 |
configuration-space.csv, pairwise-output.csv | Part 2 |
usage-by-configuration.csv, feature-adoption-by-region.csv | Part 2, risk |
regional-rules-policy.zip | Part 2, Class 1 |
api-change-brief.md, templates.md | Part 2, rollout |
Each bug folder has the incident, the pull request history, the coverage report and the surviving mutants. The SonarQube configuration is at the root of the pack.
Carts at exactly the minimum value are rejected for three days after a refactoring described as "behaviour unchanged".
Distributors find under-invoiced orders at month-end reconciliation. Only some configurations are affected.
Checkout errors for 47 minutes while the global error rate stays below the rollback threshold.
| For each bug, the group records |
|---|
| Root cause in one sentence · Would an adequate unit test have prevented it, and why · Preventive test, with its layer and what it asserts · Impact on the retailer · Impact on operations |
The Tradeline orders product combines 3 tiers, 4 regions, 3 integrations, 2 data modes and 4 optional features. The orders team must also release a breaking change to the Orders API.
Calculate the number of configurations and the number of pairs to cover.
Check pairwise-output.csv and add risk-based configurations with evidence from the usage files.
Assign checks to layers and ask an assistant for contract tests, then review what it produced.
Rings, cohort stop criteria and compatibility window for the v2 change in api-change-brief.md.
Write a production readiness criterion that someone outside the group can verify.
Both templates are in templates.md. The matrix states who can talk to whom during the transition; the plan states how the change reaches tenants and how it stops.
| Compatibility Matrix | |||
|---|---|---|---|
| Consumer | v1 | v2 | Supported until |
| ERP connector | yes | ring 0 | date |
| Distributor B (br-south) | yes | vendor release | date |
| Small integrators | yes | notice | sunset date |
| Rollout Plan | |||
|---|---|---|---|
| Ring | Who | Cohort metric | Stop if |
| 0 | internal | contract and reconciliation | any difference |
| 1 | first cohort | error rate of the cohort | threshold, time |
| 2 and 3 | remaining stamps | per consumer | threshold, time |
The case and the deliverable are the same for both classes. What changes is who leads each part and how deep the group goes into code.
The group writes contract and property tests for the regional rules policy in regional-rules-policy.zip, which runs with Python and pytest. Some tests may fail against the current code: record the input that breaks the rule before changing anything. QA professionals lead the review of AI-generated tests.
QA professionals lead configuration selection and the test portfolio. SRE professionals lead the rings and the stop criteria, including the cohort metrics and the thresholds. Architects check the schema strategy of the API change.
Groups compare the root causes they found, the configuration sets they chose and the rings they proposed. The rubric below is formative and nobody receives a grade.
| Criterion | Proficient | Developing |
|---|---|---|
| Effectiveness and coverage | Suite effectiveness measured beyond coverage, and combinatorial selection complemented by risk | Coverage treated as proof of quality, or configurations chosen arbitrarily |
| Portfolio | Test layers reduce reliance on end-to-end, and AI-generated tests are reviewed | One end-to-end test per variant |
| Rollout | Rings, compatibility window and stop criteria defined | Single rollout to the whole base |
The post-work applies the session to a real or hypothetical change in the participant's team. It takes about 20 minutes and feeds Project Development.
Write a Minimum Compatibility Matrix for a real or hypothetical change, with the support window and the deprecation signal. Then compare coverage with a measure of test effectiveness, such as the mutation score, for one service of the team. Keep names of internal systems out of anything you share.
Rings and cohort stop criteria depend on seeing the product by tenant, cohort and stamp. Workshop 4 takes up observability, service level objectives by cohort and incident diagnosis when the global dashboard looks healthy.
Testing the Configuration Space · Prof. Afonso
By the end of the session, participants should be able to measure the effectiveness of a test suite beyond coverage, select representative configurations from a large configuration space by combining pairwise coverage with risk, compose a layered test portfolio with reviewed AI-generated tests and plan the rollout of a breaking change by rings, with a compatibility window and verifiable stop and rollback criteria.
Two-hour online workshop following the standard structure of the program. A retrieval question and a poll open the session, a thirty-minute briefing presents test effectiveness, combinatorial explosion, the single-artifact pipeline, the layered portfolio and progressive delivery, and the facilitator works a live example on a well-covered microservice of Tradeline, a fictional marketplace with synthetic data. Groups of five or six with rotating roles then work a two-part lab: the root causes of three production bugs, and the selection of configurations, the test portfolio and the rollout plan for an API change. Class 1 also writes contract and property tests in code. A debrief compares the groups' answers and the session closes with the post-work.