So I was in my garden yesterday, looking at my cucumbers. They weren’t doing great. One of them had this fuzzy gray stuff on it — botrytis, the garden book said. “Noble rot” if you’re making wine. Just “rot” if you’re trying to make a salad.
But here’s the thing: even moldy it was still recognizably a cucumber.
My neighbor could look at it and say “that’s a cucumber.” My dog could smell it and know “cucumber, but spicy.” Even the fungi consuming it understood, in their fungal way, that this was cucumber-shaped food.
Which got me thinking about that other kind of cucumber. The testing kind. The one where you write:
And if you write “clicked” instead of “click”? FAILURE. Red text everywhere. The computer throws up its hands and says “I DON’T KNOW WHAT YOU WANT FROM ME.”
I know this developer — let’s call her Alice (that’s not her name, but she does fall down rabbit holes a lot). Alice loved the idea of Cucumber. Write tests in English! Let the business people understand! Peace and harmony throughout the land!
But then reality happened.
Alice spent more time fixing grammar than fixing bugs. The business people stopped reading the tests because they kept failing for reasons that had nothing to do with the business. The dream became… well, a pickle.
That’s when I remembered my moldy cucumber. What if our testing cucumber could be a little… fuzzier? A little more forgiving? What if it could understand that “click,” “press,” “tap,” and “violently jab at” all mean roughly the same thing when you’re trying to activate a button?
No wait, that’s not right. Let me try again…
So there’s this thing called Botrytis BDD. (Yes, named after the fungus. Stay with me here.)
Instead of making you memorize the exact incantation for each test step, it does something weird: it tries to understand what you mean. Like that friend who can parse your 3am texts about “the thing with the stuff at the place.”
The magic happens through LLMs. But instead of using them to write poetry or solve world hunger, we’re using them to figure out that “mash the buy button” means the same as “click the purchase call-to-action.”
I should probably tell you how it actually works. There’s this thing where…
Actually, you know what? Let’s talk about my cousin first. My cousin collects stamps. Not interesting stamps — just regular stamps that you’d use to mail a letter. Thousands of them. All slightly different but essentially the same.
That’s what Cucumber step definitions felt like before Botrytis. Collections of slightly different ways to say the same thing:
But with Botrytis? You write one step, and it figures out the rest. Like having a stamp that works for any letter, to any country, even if you drew it yourself with crayons
When you run a scenario and Botrytis can’t find an exact match for your step, it:
Asks the LLM “what did this human probably mean?”
Looks through existing step definitions
Finds the one that makes the most semantic sense
Runs it
Pretends everything is fineLogs what it did in case you care
Here’s what I think is really happening: we’ve been trying to make humans write like computers. But what if we made computers read like humans instead?
My moldy cucumber in the garden doesn’t stop being a cucumber just because it’s not perfect. Why should our test steps stop working just because we used a synonym?
The LLM might decide “delete all user data” is semantically similar to “refresh the page”
Your tests might pass when they shouldn’t (but they probably already do that)
You might forget how to write precise step definitions (is this bad?)
Other developers might judge you (they already do)
So anyway, that’s Botrytis BDD. It makes your Cucumber tests moldier, but in a good way. Like blue cheese. Or that expensive wine that sommeliers describe as “having notes of noble rot.”
Yesterday I went back to check on my moldy cucumber. It was gone. But in its place, there was a small sign that said “GONE TO HELP OTHER CUCUMBERS.” I choose to believe this is true.
Maybe that’s what Botrytis BDD is really about: helping cucumbers help themselves. Teaching them that perfection is overrated. That understanding is more important than exactness. That sometimes the best tests are the ones that know what you meant to say.
Oh, right. This is actually a real thing. You can find Botrytis BDD on GitHub at:
https://github.com/sublayerapp/botrytis
Or Rubygems at:
https://rubygems.org/gems/botrytis
Go forth. Make your tests fuzzier. Let your cucumbers develop a healthy amount of mold. Stop letting semicolons and synonyms ruin your day.
And if you see my cucumber, tell it I said hi.