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…

My “Improving Testability” Article on InfoQ

Articles are the best, right? So I’ve got one for you. By yours truly, it was published on the great InfoQ site. It’s called “Improving Testability” and I won’t say what’s it about, suspense is everything. You’ll laugh, you’ll cry, you’ll change your code, you’ll test. Go ahead, read it.

Lazy tests

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…

Code is cheap

Code Is Cheap

A few weeks back I was working with a client on TDD. We were working on the first part of a new application, to figure out the design. We wrote a test first, of course, for an end-to-end, happy-path scenario. But here’s a surprise. Instead of building the main modules Read more…