phpunit

  • One flaky test split into three

    A test asserting three things across two systems, failing intermittently for three years, split into three tests that each assert one. Splitting is diagnosis rather than a fix…

  • The test that had been quarantined since 2023

    A quarantine list with a deadline, three extensions, and one test covering a payment path that had been skipped for three years.

  • Running PHPUnit inside PHPUnit

    Testing an extension, which means executing a test run and asserting on what it produced. A subprocess rather than an in-process run, because the extension registers against a…

  • A PHPUnit extension, and the event that does not exist

    An extension that needs coverage data, which the event system does not carry. The event system is about test lifecycle rather than about the runner’s outputs, which is…

  • Writing a PHPUnit extension

    turkerdev/phpunit-json-coverage-report, and a coverage report a machine can read. Coverage as a percentage in a log, and no way to ask which paths changed.

  • Parallel tests, and the fixture that could not be

    Eight parallel processes, and one test group that writes to a fixed path on disk. Two runs — parallel for everything and serial for the exceptions — is…

  • A test suite that runs on every commit, in ninety seconds

    Four minutes forty is fine and ninety seconds changes behaviour. The threshold below which running the suite stops being a decision.

  • PHPUnit 12, and a two-hour upgrade

    A third consecutive annual major, each cheaper than the last, which is what doing the first one properly buys. The cost of an annual major is almost entirely…

  • PHPUnit 12, and the tests we deleted instead

    A two-hour upgrade, and a directory of 188 tests excluded from every tool since 2023 and running on every push.

  • A coverage driver change that broke one CI image

    PHPUnit 11 dropping support for one coverage driver, on a CI image that had it and not the other. The upgrade forced a change that was overdue for…