Testing

Posts about Testing

  • Published on
    Reading time
    19 min read

    GPS Simulator, part 3: a GPS that behaves like a real one, with noise, curves and geofences

    A perfect route, at constant speed and with zero error, hides the bugs that show up on a real GPS. A walk through the simulation engine of GPS Simulator: a pure function of elapsed time, the tick loop in the foreground service, repeatable noise, speed variation, braking before curves, a parked point that drifts, the geofence state machine, and how to try each imperfection yourself.

  • Published on
    Reading time
    6 min read

    Why I Threw Away My First Test Suite, and What I Put in Its Place

    While rebuilding two production Flutter apps, one started with no tests and the other with 321 inherited tests nobody reviewed. Today they have more than 500 test files between them. Along the way, I deleted an entire suite I had written myself, audited tests one by one and created tests that watch the tests.

  • Published on
    Reading time
    5 min read

    Testing ReactJS with Jest

    In this post, we look at using Jest to test ReactJS apps: installation, example tests for basic components, components with state and props, and asynchronous calls. Jest simplifies testing and helps make sure the code works correctly.