testing

  • The dependency we vendored

    A 200-line package with 41 transitive dependencies, doing one thing, and an advisory in something four levels down that we had never heard of.

  • terraform test, and the module that had no assertions

    A testing framework in 1.6, usable in 1.7, and a module that had been verified by applying it and looking. command = plan asserts against the plan without…

  • Reproducing a build from six months ago

    A security question about a release from July, and no way to rebuild it. The same commit produces a different image, and neither of them is wrong.

  • Branch coverage at 100%, and meaningless

    Every branch executed, and no assertion that any of them produced the right answer. The assertTrue(true) is the tell, and it exists because a test with no assertions…

  • Block hooks, and the plugin that inserts itself

    6.4 in November, and a plugin that can insert a block without editing a template. Install instructions that said “now edit your footer”.

  • The Randomizer, and rand() in a test that must be stable

    A test using shuffle() that failed roughly once a fortnight, and a global seed that could not be set without affecting everything else. The Randomizer arrived in 8.2…

  • A fixture builder instead of a fixture file

    A JSON fixture of a full order, loaded by 40 tests, where each test cared about two fields and was coupled to the other thirty. The fixture file…

  • Typed class constants, and the interface that had been lying

    8.3 on 23 November, and a constant can finally declare a type. An interface constant documented as a string, implemented as an int in one class.

  • A module boundary that is a directory and a test

    A boundary everybody agrees on and nothing checks is a boundary that will be crossed within a fortnight. A directory is a convention and a test is a…

  • The method that stopped overriding anything in 2019

    #[Override] in 8.3, and what it asserts. A subclass method dead since a parent rename four years ago, with a bug report closed as not reproducible.