Talks mature
This idea is complete, spare the occasional tending.
by Matthew Lyon  •  July 13, 2023

Generating Tests

This talk was floating around in my head for the better part of seven years before I finally hammered it out. I tried some live coding, and while I didn’t succeed in doing what I wanted to with it I think it still illustrated the ideas well. You can follow along with the example code if you’d like. It’s blessedly short compared to the other talks from SSDUG I’ve posted here.

Play Video: Generating Tests

This testing technique holds a special place for me, as it’s helped some of the most lasting, impactful things I’ve accomplished in my career. I also love it because:

  • it finds problems I never would have gone looking for

  • it forces me to really think about what the thing I’m trying to test actually does, rather than just about what some scenarios for success or failure look like

  • it helps me to understand and define the boundaries of the thing I’m trying to test

  • it empathizes with me by presenting the simplest way it can fail my test

It’s also given me a new gripe about JavaScript’s notion of equality: while officially -0 === +0, this apparently does not hold true for deep comparisons made by some testing libraries.

Anyway, I hope to put together a blog post on the topic soon.

Keep in touch

Newsletter RSS Email

Here

Search Home About

Elsewhere

Fediverse BlueSky Instagram Codeberg GitHub Itch

Music

Bandcamp Apple Music Spotify Deezer Tidal

2025 Matthew Lyon