testing

  • CSS Grid arrived, and the layout hacks can go

    Chrome 57 and Firefox 52 shipped it a fortnight apart in March. Replacing a grid system of nested rows, negative margins and a clearfix with fourteen lines.

  • Static analysis on a codebase that has never had any

    Four thousand errors on the first run is a number nobody can act on. Starting at level 0, ignoring by pattern, and raising the floor one level at…

  • The asset pipeline Laravel 5.4 shipped

    Elixir wrapped gulp, which wrapped everything else. Mix wraps webpack directly — and leaves the configuration reachable when the abstraction runs out.

  • The REST API in core, and the plugin it replaces

    4.7 shipped the content endpoints. What moving off the feature plugin involves, why authentication is still the unsolved half, and the read API every site now exposes.

  • phpunit.xml groups let CI split the suite

    A suite that takes twenty minutes gets run less often, which is the opposite of what it is for. Groups let the fast tests gate every push and…

  • Queues, workers and the jobs that fail twice

    The email that arrived four times and the charge that arrived twice. What makes a job safe to run again, and keeping workers alive without them serving stale…

  • Argument order decides how readable the failure is

    PHPUnit takes the expected value first and the actual second, and getting them the wrong way round produces a test that passes and fails identically — but reports…

  • Extracting a service without a rewrite

    The reporting code had one caller and a six-hour test run. Finding the seam, dealing with the shared schema honestly, and routing traffic gradually rather than switching.

  • Integration tests want a transaction, not a truncate

    Resetting the database between tests by truncating every table is correct and slow, and it re-runs the seed data on each one. Wrapping each test in a transaction…

  • A deployment pipeline that runs the tests first

    Deploying by rsync on a Friday afternoon, and what replaced it: lint, test, build, stage, promote — with a rollback that is the same mechanism rather than a…