Generating Tests With Properties

at SSDUG on Thursday, July 13, 2023

This talk has been floating around in my head for the better part of seven years. 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.

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’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.

Generating Tests With Properties Matthew Lyon 2023 — license: CC BY-NC-SA 4