-
Core Java
A Surprising Injection
So, I owe Jim an apology. He’d written a working mockito and JUnit test, and I told him in review…
Read More » -
Software Development
Fuzzy Assertions
As discussed in other Test Smells, like Trail by Competitive Calculation, and It Passed Yesterday, it’s very easy to create…
Read More » -
Core Java
To Infinity (Streams) and Beyond!
Java allows you to process data in collections or streams. It’s very easy to think of streams as a technique…
Read More » -
Software Development
Test Setup is Somewhere Else
What to Expect of a Test Case It prepares some scenario It executes the system under test It makes some…
Read More » -
Software Development
Hidden Meaning
Good tests should: Run quickly Fail meaningfully Document the system under test Explain themselves when they go wrong Consider the…
Read More » -
Software Development
Name Parameters In Tests?
As discussed in What are We Testing Again? from the Test Smells, making the test code explain its test case…
Read More » -
Software Development
The First and Last Rites
Let’s look at another test smell. Consider the following tests: @Test public void connectionWorks() { database = openDatabase(); database.healthCheck(); database.close();…
Read More » -
Software Development
It’s Too Noisy
I want to look at a general case of noise in code. To do so, let’s look at how to…
Read More » -
Software Development
Missing Parameterized Test
Sometimes, what you need is a parameterized test. They do the job of representing a single way of testing with…
Read More »