Put The Mock Gun Away
I gave a course recently on unit testing in Angular, and we were looking at some code the developers wrote, and we wanted to test. It looked something like this: someApiCallAsync(p1, p2, …) .then(response => { if (response.ok){ …. } else { ….. }; }) Basically we’re looking at an Read more…
How to test the UI (like JavaFX )?
Testing UI is hard. Or is it? It really depends on what we’re talking about when we’re saying “UI testing”. This question came up recently in the “Unit Wars” webinar. And I think that it requires a deeper answer. I remember writing Windows apps in C++, calling CreateWindow APIs, keeping Read more…
The Right Tool For The Right Job?
I was asked in a recent webinar: What is the purpose of unit testing frameworks? That’s a cool question, and while it seems an easy answer, the way we use a framework makes it more subtle. In the beginning, a unit test framework was a tool to define, run and Read more…
Webinar Recording: Unit Wars
It’s that time of year. Summer’s a bit slow, but with COVID running free as a bug, it’s time to pit two behemoths against each other: JUnit or TestNG? Which do you choose for your next Java project? Turn your AC on and watch this. Or better yet, ask me Read more…
Video: The Cost Of Bugs
Do you know how much bugs cost? Not the big exploding ones. Not the ones you read about in the news. Just regular bugs from work. The ones you put in last week, and one you fix by the end of the day. Seems like part of the work, right? Read more…
Video: Lazy Asserts
You know that feeling when you’re writing a test, and you start of all fresh and energetic, and write the Arrange, the setup part? And that takes much of you, but you keep on going, you get to Act part, that actually executes the code. That’s draining, man. So, in Read more…
How to TDD a REST API – Webinar Recording
So, is it possible? Are the legends true? As always, it depends. But in this webinar I’m tackling one of the worst beasts in coding – TDD an API. I know, I know. They said it couldn’t be done. But twenty small steps later, I’ve got it. In this webinar Read more…
Video: The Mystery of Untestable Code
Does the light in the fridge stay on when you close the door? It’s one of life’s greatest mysteries. I’ve almost hired a detective to check that, but then I remembered my engineering background, and the mystery was solved. But what about zombies, or the sasquatch, or untestable code? Well, Read more…