Jazoon 2013 – Spock: boldly go where no test has gone before
If you look at your tests, do you see a lot of repetitive patterns? Or are you looking for a way to express your intent more easily? Then, Spock might be for you. The talk “Spock: boldly go where no...
View ArticleJazoon 2013 – Test First Saves The World
The opening keynote “Test First Saves The World” by Joe Justice introduced WIKISPEED. The project aims “to deliver a mass-production, ultra-efficient, Comfortable Commuter Car, the C3“. You can find...
View ArticleTesting The Impossible: Inserting Into Database
Tests run slow when you need a database. An in-memory database like HSQLDB or Derby helps but at a cost: Your real database will accept some SQL which your test database won’t. So the question is: How...
View ArticleTesting the Impossible: Asserting Several Values At Once
So you want to check several values at once, maybe because that helps you to locate the error more easily. Simple: int v1 = list1.size(); int v2 = list2.size(); int v3 = list3.size(); assertEquals (...
View ArticleVerifying Results in Tests
So you finally got yourself writing a test against a database. In the test, you have to verify that a row in the table is correct, so you write: assertEquals (...
View ArticleMutation Testing
From the website: How do you know your test suite is “good enough”? One of the best ways to tell is mutation testing. Mutation testing seeds artificial defects (mutations) into a program and checks...
View ArticleTesting the Impossible: Hardware
Victor Lin asked on StackOverflow.com:Should I write unit test for everything? In his case, he wanted to know how to test an application which processes audio: Reads the sound from a microphone, does...
View ArticleBackground Unit Testing
I just found this article: Background Unit Testing: New Evolutions in Unit Testing and IDE Integration The idea is that your IDE should run the unit tests in the background just as it runs the compiler...
View ArticleTesting: Pay in Advance or Afterwards?
In a recent post, I talked about people ignoring the cost of some decision. In his blog “Joel on Software”, they talk about the same thing: How easy it is to fall into the “we must have strict rules”...
View ArticleWriting Testable Code
Just stumbled over this article: “Writing Testable Code“. Apparently, it’s a set of rules which Google uses. While I’m not a 100% fan of Google, this is something every developer should read and...
View Article