My WooCommerce test suite passed in all four recorded CI runs: 120 of 120 executions, retries 0. That tells you the runs were green. It does not tell you the tests can fail. So I broke the store on purpose in three different ways, ran the unchanged tests, and wrote down what failed. Each fault was caught by the tests I had predicted would catch it.

This post shows the method, the failure messages and, just as important, what the experiment does not prove. The project is described in the WooCommerce case study.

Read this first. The project is a sample pilot on a disposable WordPress Playground store (SQLite), not client work and not production. The three faults are mine, chosen so that each maps to scenario IDs. None of them is a real WooCommerce defect, and no WooCommerce product defect was found in this project.

1. Why green is not enough

The suite has 19 scenarios and one smoke test. If its tests could not fail, those four green runs would look exactly the same. I wrote about four ways that happened in my other suites in Green Doesn't Mean Tested. This time I wanted evidence for the opposite claim: that specific tests go red when the thing they guard breaks.

2. The method

  • The tests are not touched. A test-only plugin, blueprint/pilot-faults.php, changes the store's behaviour, so the tests only see a store that behaves wrongly.
  • The plugin is off by default. It is written into the store only when PILOT_FAULT=<name> is set while the store boots. CI never sets it, and the blueprint refuses to build if both CI and PILOT_FAULT are set.
  • The prediction comes first. Each fault was mapped to the scenario IDs it should break before it was run. The mapping is in comments in the plugin.
  • Run only the tests it should break, with a trace, then boot a store with no fault and run the same tests again.
PILOT_FAULT=stock-not-reduced npm run store                                 # terminal 1
BASE_URL=http://127.0.0.1:9400 npx playwright test -g "STK-03" --trace on   # terminal 2
How to reproduce one of them, from docs/PROOF-OF-FAILURE.md (opens in a new tab).

The runs were on my development machine on 1 December 2026, against the pinned versions (WordPress 7.1.5, WooCommerce 11.3.1, PHP 8.3, SQLite), with the tests at commit bc377e0 (unchanged since 83db4c1). Local timeouts apply: 300 s per test and 120 s per assertion, which is why a failing assertion takes about two minutes to give up.

3. Fault 1: a wrong sale price

On a product's own page, the sale price is shown ₹100 higher than it really is: the mug's ₹499.00 appears as ₹599.00. The shop grid and the cart still use the real price. I expected PRC-01 to fail at the product-page step.

Error: expect(locator).toContainText(expected) failed

Locator: getByRole('main').getByRole('insertion', { includeHidden: true })
Expected substring: "₹499.00"
Received string:    "₹599.00"
Timeout: 120000ms

> 84 | await expect(page.getByRole('main').getByRole('insertion', { includeHidden: true })).toContainText('₹499.00');
PRC-01 under the sale-price-wrong fault.

The earlier shop-page assertion (line 76) passed, which fits a fault that affects only the product page. The test stops at its first wrong value, so its cart assertions were never reached.

4. Fault 2: half the coupon discount

Percentage coupons take half of what they should: SAVE10 gives 5% instead of 10%. I expected CPN-01 (valid coupon) and TOT-01 (totals agree end to end) to fail. I did not expect CPN-02 or CPN-03, which are about coupons being refused, to be affected, and I did not run them.

CPN-01
Expected substring: "-₹159.80"
Received string:    "Discount-₹79.90save10Coupon: save10"

TOT-01
Expected substring: "-₹89.70"
Received string:    "Discount-₹44.85save10Coupon: save10"
Both tests received exactly half of the expected discount (excerpts; locator and line number trimmed).

5. Fault 3: stock that never goes down

Placing an order no longer takes the items out of stock. I expected STK-03 to fail, and the place it failed is the useful part. The checkout succeeded and the order total was right. The failure came from reading the stock level back through the REST API, a different route from the one the checkout used.

Error: expect(received).toBe(expected) // Object.is equality

Expected: 3
Received: 5

> 89 | expect(bottle.stock_quantity).toBe(3);
STK-03 under the stock-not-reduced fault.

That is why the suite reads results back by a different route: here the checkout looked fine, and only the read-back noticed.

6. The three results together

Each fault, the tests it should break and what happened
Fault Should break Actually failed Slipped through Clean re-run
sale-price-wrongPRC-01PRC-01nonePRC-01 passed
coupon-half-discountCPN-01, TOT-01CPN-01, TOT-01noneCPN-01, TOT-01 passed
stock-not-reducedSTK-03STK-03noneSTK-03 passed

The clean re-run was one run of the four distinct tests on a store with no fault: 4 passed, 0 failed, and the store log showed no fault-injection notice. The PRC-01 failure is the one trace I kept; the Evidence Library shows it in the proof of failure section.

7. What this does not show

  • Three faults, not the whole suite. Only PRC-01, CPN-01, TOT-01 and STK-03 were shown to fail under a fault. The other 15 scenarios have no fault run, so for those the ability to fail rests on the zero-assertion guard and the read-backs.
  • A test stops at its first wrong value. Under the coupon fault TOT-01 failed at the cart step, so its checkout, confirmation and stored-order assertions were not exercised by that fault. A fault that corrupted only the stored order would be a separate experiment.
  • The faults are mine. I chose them to map onto scenario IDs; they are not drawn from real defects.
  • CPN-02 and CPN-03 were not run under the coupon fault, so my expectation that they are unaffected is untested.
  • Single local runs. The failures were not repeated.
  • A disposable store, not production. WordPress Playground on SQLite, Cash on Delivery only, no online payment gateway tested.

What you can take from this: a suite that has only ever been green has not been tested, and breaking the system on purpose, with the prediction written down first, is a cheap way to find out.