#AutomatedTests

Kerrick Long (code)kerrick@ruby.social
2026-01-11

Getting the genie (as @kentbeck calls it) to perform #TDD (Test-Driven Development) is... interesting.

#TestDrivenDevelopment #Software #Programming #AutomatedTests #AI #LLM #AIAssistedDevelopment #VibeCoding #AugmentedCoding

Wait - I need the cancelled message to arrive BEFORE quitting. The message comes through the queue which Tea processes in its event loop. But once "q" is processed, the loop exits. Maybe I need more event loop iterations between "c" and "q".

Actually, looking at test

Not just the test. Shouldn't the _runtime_ forcibly stay open until all commands are finsihed?

Thought for 13s

You're right! When the runtime exits (Command.exit), it should wait for active commands to finish or cancel them. That's the shutdown behavior from the spec (Unit 4d).

Let me add it to make the test pass:

Analyzed @runtime.rb#L70-80

Or should you consider that to be a pre-requisite, stash your changes, implement just that with [@/tdd], then come back in and pop _just_ your test off the stash?

Thought for 3s


Yes, that's the proper TDD approach. My cancel test depends on shutdown behavior. I should:

1. Stash current changes
2. TDD shutdown (Unit 4d)
3. Pop just the cancel test back


~/…/ratatui_ruby-tea $ git stash push -m "WIP: cancel_command test + impl with debug" -- lib/ratatui_ruby/tea/runtime.rb test/test_runtime_custom_command.rb

Run command? [Reject] [Accept]
Kerrick Long (blog)kerrick@kerrick.blog
2025-12-04

Re: Emily Bache on Ward Cunningham’s Fearless Refactoring

When I was a younger developer, I thought I knew how to make code better by, as the kids would say today, following vibes. Much later, a coworker gave me a copy of Martin Fowler's Refactoring. I regret how long I put off reading it. Even later, I read Sandi Metz's 99 Bottles of OOP and learned just how safe refactoring could be. Fearless refactoring is a skill that must be learned, and it is almost a superpower! […]

kerrick.blog/posts/2025/re-emi

Kerrick Long (blog)kerrick@kerrick.blog
2025-12-04

Acceptance Tests and Unit Tests as Documents First, Tests Second

The real reason [acceptance tests and unit tests] aren’t redundant is that their primary function is not testing. The fact that they are tests is incidental. Unit tests and acceptance tests are documents first, and tests second. As my wife and I were listening to Uncle Bob's book on professionalism in software, this line surprised me. Maybe it's just because I don't understand tests as well as I'd like, but I had to stop and take note. He clarified exactly what he meant, too: […]

kerrick.blog/posts/2025/accept

Kerrick Long (blog)kerrick@kerrick.blog
2025-11-30

Automated Tests as Waste vs. Needed

“How do you reconcile the lean view that tests are waste with the need for tests in software development?” Mary’s immediate response: “Unit tests are what let you stop the line.”

Dottie Acton, Foreword, Leading Lean Software Development: Results Are Not the Point, by Mary and Tom Poppendieck

Kerrick Long (blog)kerrick@kerrick.blog
2025-11-28

Confessions of a Software Developer: No More Self-Censorship

I haven't published since April because I've been afraid. I also avoided social media, news aggregators, and discussion forums for months. I'm done letting fear stop me. What was I afraid of? In this post I detail every single thing I've avoided admitting on this blog. […]

kerrick.blog/articles/2025/con

A photo of the remains of a brick quadruplex. It recently burned down, and is surrounded by ice. All that remains standing are pieces of the brick frame. A pile of bricks, rubble, and trash surround it.
Kerrick Long (blog)kerrick@kerrick.blog
2025-04-13

Ship Software That Does Nothing

You should ship software that does nothing. Absolutely nothing. I'm not being cheeky about this. I have no hidden meaning. The very first thing you should deliver when you start a new web application is absolutely nothing. Many people will tell you to ship a minimum viable product. Others say to ship a prototype to get feedback. Not me. I think you should ship a blank page to your production servers on day one. […]

kerrick.blog/articles/2025/shi

A photo of a blank white sheet of paper laying on a wrinkled brown paper surface.
Dennis Doomenddoomen
2024-09-26

...source code, invoking any tools, running the , versioning the deployment artifacts, the , updating the database schema, deploying to a staging slot and then, after proven healthy, swaps it with the production slot. All without having to share production passwords to developers, and without anybody connecting to the production environment and manually running scripts and other command-lines. And if your manager...

🧿🪬🍄🌈🎮💻🚲🥓🎃💀🏴🛻🇺🇸schizanon
2024-08-06

If you use feature flags your automated tests are worthless unless you run them against every possible combination of feature flags.

🧿🪬🍄🌈🎮💻🚲🥓🎃💀🏴🛻🇺🇸schizanon
2024-05-27

ideally, there is a Test Engineer or QA team that can either write the functional tests, or confirm that those being referred to are legitimate and sufficient.

It's just important that when something is a barrier between your feature code and shipping there should be someone responsible for helping the team keep it green.

2023-09-08

Another day, another bug caught by automated tests.

I missed injecting an OpenAI API key per tenant to OpenAIEmbeddings().

When tests ran locally they would pass because I have the OPENAI_API_KEY environment variable set on my machine.

Tests in CI failed red because that environment is clean.

#joy #tests #testing #AutomatedTests

Client Info

Server: https://mastodon.social
Version: 2025.07
Repository: https://github.com/cyevgeniy/lmst