Independent QA Automation Project
WooCommerce Store QA Automation
Does the shop charge the right amount and keep the right records?
A sample client pilot, built the way a fixed-scope automation pilot would be for a paying client: agree a short scope, build the tests, run them on every code change, and report honestly, including what was not tested. The outcome it protects is one that matters most for a shop: a customer can buy a product, is charged the right amount, and the order, its status and the stock level end up correct. The store, data and “client” are fictional.
01 Context
What the Pilot Is For
A fixed-scope automation pilot is a short engagement: agree what matters most, build the tests, run them on every code change and report the results, including what was not tested. This one is a sample. There is no client; the store, its data and the “client” are fictional, and I wrote the scope the way I would hand it over before building anything.
A customer can buy a product, is charged the right amount, and the shop’s records (order, status, stock) end up correct.
That one outcome decides what is tested. The system under test is WooCommerce 11.3.1 on WordPress 7.1.5 (PHP 8.3, SQLite), with five products, two coupons, one customer account and one flat shipping rate. The currency is INR and tax is off, so every total can be checked by hand. The store is a disposable WordPress Playground site, rebuilt from scratch on every run: it is not a production shop.
Store (fresh boot) → Catalogue (prices) → Cart (stock) → Coupons (totals) → Order (account + admin)
02 Scope
19 Scenarios, Grouped by Area
14 of the 19 scenarios are P1 (money, stock or order-record correctness) and 5 are P2 (supporting behaviour). Each scenario’s steps and expected result are in SCOPE.md §7 (opens in a new tab).
| Area | Scenario IDs | What is checked |
|---|---|---|
| Catalogue and pricing | SHP-01 SHP-02 PDP-01 PRC-01 |
Shop listing and prices, search, product page, sale price shown struck through and charged in the cart |
| Cart | CRT-01 CRT-02 CRT-03 |
Add, change quantity, remove; line totals and subtotal |
| Stock rules | STK-01 STK-02 STK-03 |
Out-of-stock product cannot be bought (page and direct server request); quantity above stock refused; stock goes down by the quantity bought |
| Coupons | CPN-01 CPN-02 CPN-03 |
Valid 10% coupon; unknown code rejected; expired coupon rejected |
| Totals | TOT-01 |
Subtotal, discount, shipping and total agree in the cart, at checkout, on the confirmation page and in the stored order |
| Checkout | CHK-01 CHK-02 CHK-03 |
Empty form refused and no order created; guest checkout; logged-in checkout with saved details |
| After the order | ACC-01 ADM-01 |
Order shown in the customer’s My Account and in wp-admin with the right status and total |
A separate smoke test (open the shop, complete one Cash on Delivery checkout) was written first to check the environment. It is the 20th test definition.
How the 20 is counted. Unique test definitions in the test files, not
executions or passes, at commit 83db4c1, the last commit that changed anything
under tests/: 20 with the smoke test, 19 without it. Method: lines beginning
test( under tests/, which leaves out test.describe
groups; there are no skipped, focused or generated tests. playwright test --list
on the current code also reports 20 tests in 6 files, and the count is 20 at each commit
cited on this page.
Out of scope, stated up front in the scope document: real payment gateways, tax, email, scheduled jobs, MySQL-specific behaviour, performance, security testing, other browsers, accessibility audits, variable products and the classic (shortcode) checkout.
03 Approach
How It Is Built
Small choices that keep a result trustworthy: a clean store each time, data from one file, and every write read back by a different route.
- Fresh store on every run
A WordPress Playground Blueprint installs the pinned WooCommerce zip and runs a seed script. A test-only plugin turns off WP-Cron and Action Scheduler loopback requests, which otherwise competed with the browser for PHP workers. Locally
npm run storekeeps one store running and tests attach to it throughBASE_URL; CI never setsBASE_URL, so it always tests a fresh store.- Test data through one file
Products, prices, coupons and the customer are defined once in
blueprint/data.ts. The seed receives it as JSON and the tests import the same object, so a seeded price and an expected price cannot drift apart. The catalogue tests deliberately write expected prices out by hand, so a changed price is noticed.- REST for setup and read-backs
Each test resets what it depends on (stock, prices, coupons) through the WooCommerce REST API, so tests pass in any order. After every write the outcome is read back by a different route: the order or stock through the REST API, or a different page. The REST client uses the admin session cookie and a nonce, so no API keys are created or stored. Orders a test only needs to look at (ACC-01, ADM-01) are created through the REST API; full UI checkouts are limited to CHK-02, CHK-03, TOT-01 and STK-03.
- Locators and page objects
Locators use roles and labels. Page objects exist only where they remove duplication: a cart page and a checkout page. There are no fixed sleeps; waits are on a visible result or on a specific server response.
- Timeouts and retries
In CI: 120 s per test and 30 s per assertion. Locally: 300 s and 120 s, because PHP runs as WebAssembly and the development machine is slow. No test overrides these. Retries are 0, so a failure is reported, not retried away. One worker, because all tests share one store.
- Zero-assertion reporter
A custom reporter counts the
expectsteps of every test and fails the run if a test passes without making any, so an empty green test cannot slip through.
04 CI
Four Recorded CI Runs, 120 Executions
The
E2E (full suite) workflow (opens in a new tab)
runs on ubuntu-latest with Node 22 and retries 0. The HTML report is uploaded
on every run; traces and screenshots are uploaded when a test fails.
| Run | Commit | Trigger | repeat_each | Passed / total | Suite wall time | Slowest test |
|---|---|---|---|---|---|---|
| 46607455020 (opens in a new tab) | c2ec87f |
push | 1 (input did not exist yet) | 20 / 20 | 6 m 22 s | TOT-01, 39.3 s |
| 46612741146 (opens in a new tab) | b1efc92 |
push | 1 | 20 / 20 | 6 m 08 s | TOT-01, 39.4 s |
| 46622672470 (opens in a new tab) | 2eec6ee |
push | 1 | 20 / 20 | 5 m 38 s | TOT-01, 35.8 s |
| 46624806768 (opens in a new tab) | 2eec6ee |
manual | 3 | 60 / 60 | 20 m 13 s | TOT-01, 44.5 s |
Suite wall time is the “Run full suite” step, which includes booting the store. All four runs started on 1 December 2026 (UTC). Retries were 0 in every run, and each run’s zero-assertion check was clean.
repeat_each 3): status Success, 20 m 48 s in total, one artifact, playwright-report. Viewed logged out: GitHub shows job logs and the job’s step summary only to signed-in users, so the repeat_each input is not visible here.
Stability. Across the four runs there were 120 test executions (20 + 20 + 20 + 60); 120 passed and none failed. Retries were 0, so a flaky test could not have passed on a second attempt. That is a small sample: it shows no flake in these runs, not that none exists.
What was tested. The test files did not change between the four tested commits;
the last commit that changed a test file is 83db4c1. Run 46607455020 predates the
repeat_each input, so it ran with Playwright’s default of 1.
Timing. TOT-01 was the slowest test in all four runs. The slowest test in any run took
44.5 s (in the repeat_each 3 run), about 37% of the 120 s limit; in the three single
runs it was 39.4 s or less, about 33%. CI was about 5x faster than the development machine,
measured on run 46607455020 (TOT-01: 3.2 min locally, 39.3 s on CI). An earlier estimate of
“about 10x” was made before any CI run and was wrong.
A fifth run. Run
46628589836 (opens in a new tab)
on commit 67abc28 (documentation only: README, case study and stage log; the tests are unchanged) also passed,
20 of 20, retries 0. It is not part of the 120.
Retention. The workflow keeps the report artifact for 14 days, so it will expire; the screenshots above are the lasting record.
05 Proof of failure
Can the Tests Go Red? Three Faults Say Yes
A green suite means little unless it can fail. In three experiments I deliberately broke the store and ran the unchanged tests.
| Fault | Caught by | Failure |
|---|---|---|
| Product page shows the sale price ₹100 too high | PRC-01 |
expected ₹499.00, received ₹599.00 |
| Percentage coupons give half the discount | CPN-01 TOT-01 |
expected -₹159.80, received -₹79.90; expected -₹89.70, received -₹44.85 |
| Orders no longer reduce stock | STK-03 |
expected stock 3, received 5 |
Each fault was mapped to the scenario IDs it should break before it was run. Each was caught
by the tests it was expected to break, none slipped through, and the same tests passed again
on a store with no fault (4 passed, 0 failed). The tests were not touched: they only saw a
store that behaves wrongly. The faults come from a test-only plugin that is written into the
store only when PILOT_FAULT is set; CI never sets it, and the blueprint refuses to
build if both CI and PILOT_FAULT are set.
sale-price-wrong fault: the failing assertion at catalogue.spec.ts:84, expected substring ₹499.00, received ₹599.00, after the 120 s assertion timeout. The trace is a local file kept out of the repository (traces/ is gitignored), so this screenshot is the public record; the written results are in PROOF-OF-FAILURE.md (opens in a new tab).What this does not show. Only PRC-01, CPN-01, TOT-01 and STK-03 were checked this way; the other 15 scenarios have no fault run. A test stops at its first wrong value, so under the coupon fault TOT-01 failed at the cart step and its later checks (checkout, confirmation, stored order) were not exercised. The faults are mine, chosen to map onto scenario IDs, not drawn from real defects. They were single runs on a local store.
06 Findings
Findings and Investigations
No WooCommerce product defects were found.
Every scenario passed on the pinned version and configuration. The failures and oddities below were a test fault (CHK-03), a login failure caused by my own first version of a debug switch, an environment limitation and one unexplained event. By the failure classification in the scope document, only a product defect is called a defect.
CHK-02: a WordPress “critical error”, not reproduced since
Seen: CHK-02 (guest checkout) ended on a WordPress “critical error” page during development. There was no PHP error logging, so the cause was unknown.
Investigation: I added a diagnostics switch, PILOT_DEBUG=1, to the test-only
plugin. It writes PHP errors and fatals to a log file in the store’s uploads folder and is off by
default and never set in CI. My first version redefined WP_DEBUG constants that Playground
already defines, which printed warnings into responses and broke the REST helper’s admin login; I
replaced it. I checked the handler by raising a deliberate fatal in a throwaway plugin: the log
received both PHP’s own entry and the handler’s.
Result: CHK-02 passed in all 6 local runs I recorded afterwards (5 with logging on, 1 without)
and in CI run 46607455020, and no PHP fatal was logged in the 5 logged runs. Cause unknown, not
reproduced. I have not classified it as a product defect, an environment limitation or a
test fault, because there is no evidence for any of them, and I did not mark the test
test.fail() or add retries.
SQLite cannot run one wp-admin Orders query
With the debug log on, the only error recorded across the logged runs was a non-fatal database
error each time the WooCommerce Orders list in wp-admin opens: SQLite cannot parse a parenthesised
UNION ALL in the month-filter dropdown query. The page still renders, the order list is
correct and ADM-01 passes. Classified as an environment limitation (SQLite instead of
MySQL), not a product defect.
CHK-03: a locator failure, fixed
The first local run of CHK-03 failed after the 120 s assertion timeout: a text locator for the joined shipping address found no element, although the page snapshot showed the text. The checkout’s address card renders the name, street and city in separate elements, so no single element’s text equals the joined string. The test now checks each part inside the “Shipping address” group. Classified as a test fault. It passed in all 5 local runs recorded afterwards and in CI run 46607455020.
Other problems found while building, with fixes in the repository:
- Background requests starved checkout. With WP-Cron and Action Scheduler loopbacks on, a checkout took over two minutes. They are switched off by the test-only plugin; order creation and stock changes happen inside the checkout request and are unaffected.
- “Your cart changed during checkout” (HTTP 409). Clicking Place Order while the checkout block was still sending the address for a shipping update made WooCommerce refuse the order. The shared helper now fills the PIN code last and waits for the server response that carried it.
- Duplicate “Total:” text on the confirmation page broke a text locator; tests target the totals table row by role instead.
07 Limits
What This Evidence Does Not Show
A disposable test store, not production
The store is a WordPress Playground site on SQLite, rebuilt on every run. It is not production and not MySQL: MySQL-specific behaviour (queries, collation, locking, migrations) is not covered, and the timings say nothing about a real host.
Cash on Delivery only
No online payment gateway was tested. Cash on Delivery is the offline method used to exercise the order flow, so card, UPI, wallet and 3-D Secure behaviour is untested here.
No product defects found is not proof there are none
No WooCommerce product defect turned up in 19 scenarios on one pinned version and configuration. That is a result about this scope, not a claim about WooCommerce.
CHK-02’s critical error is unexplained
It was observed during development and has not been reproduced since (see Findings). I do not know its cause.
Fault runs cover 4 of 19 scenarios
PRC-01, CPN-01, TOT-01 and STK-03 were shown to fail under a fault. For the other 15 there is no recorded deliberate break; their ability to fail rests on the zero-assertion guard and the read-backs.
A SQLite error on the Orders month filter
A non-fatal SQLite error is logged when the wp-admin Orders list opens. It is an environment limitation, not a WooCommerce defect, and does not affect ADM-01.
Also out of scope or not covered: email and scheduled jobs (turned off in this environment), tax (off; currency is INR), browsers other than Chromium and the classic checkout. The stability evidence is four runs and 120 executions, all on one day and on the same runner type; it does not cover other days, other runners or long-term drift.
08 Next
What I’d Do Next
- Keep recording CI runs over more days to see whether any flake appears, and triage any failure from its trace before anything else.
- Extend the fault injection to the other P1 scenarios, and to faults that corrupt only the stored order, so each read-back check is shown to fail on its own.
- Run the same scenarios against a MySQL-backed store to see what the SQLite environment hides.
- Add Firefox and a mobile viewport, then the classic (shortcode) checkout.
- If the CHK-02 critical error returns, capture it with
PILOT_DEBUG=1and classify it.
09 Evidence
Evidence & Verification
The repository, its tests, the CI workflow and the written results are public on GitHub. Job logs need a GitHub sign-in.
-
Source Code
Playwright tests, page objects, the WordPress Playground Blueprint and seed data, the reporter and the CI workflow. The 20 tests are counted at commit 83db4c1.
-
CI Execution
GitHub Actions “E2E (full suite)” workflow: the four runs above (46607455020, 46612741146, 46622672470, 46624806768) and the later run 46628589836. Job logs need a GitHub sign-in; the report artifact expires after 14 days.
-
QA Documentation
The scope with every scenario’s steps, the written case study, and the proof-of-failure write-up with its error excerpts.
Want to see the testing evidence?
The tests, the CI workflow and the written results are in the repository, including what was not tested.
If you need something similar tested, see QA Services.