Articles on Testing

Alon Salant

Alon Salant

iPhone Unit Testing Toolkit

As we get in to developing iPhone/Touch applications at Carbon Five, we obviously want to bring over all our best agile practices including test driven development (TDD). I’ve been bootstrapping with the beta version of the Pragmatic iPhone SDK Development book but was disappointed to find no discussion of unit testing for the iPhone. So

Christian Nelson

Christian Nelson

Database Testing with Spring 2.5 and DBUnit

Note: Version 0.9.1 of c5-test-support has been released. We’ve been using DB Unit on our Java projects for years and the mechanics of how it’s used has evolved over time. I’ve recently spent some time making it work a little nicer for how we typically write database tests. What I’ve created makes using DBUnit on

Christian Nelson

Christian Nelson

Multithreaded Testing

Every now and then you’ll work on something that needs to handle requests from multiple concurrent threads in a special way. I say “special way” because in a web application, everything needs to handle being executed concurrently and there are a slew of techniques used to handle this (prototypes, thread locals, stateless services, etc). Here’s

Christian Nelson

Christian Nelson

DBUnit 2.2, Spring, and Testing

You may have noticed that DBUnit changed its connection closing behavior in v2.2. We noticed it when tests deriving from our custom DatabaseTestCase implementation (which uses DBUnit) starting failing. Initially we just reverted back to version 2.1. Since then I’ve discovered what the problem was and found a workaround, and while I was at it,

admin

admin

Generic Custom Argument Matching in EasyMock

EasyMock is a clean, simple library for creating mock objects. It provides a whole range of facilities for declaring our expectations of the method call interactions on the mock including call count, call order, return values, exceptions, and argument matchers. Unfortunately, the argument matchers provide a limited set of argument expectations and a somewhat cumbersome

Michael Wynholds

Michael Wynholds

DBUnit, HSQL and the BOOLEAN data type

We have been using HSQL in-memory along with DBUnit for unit testing lately, and I found an issue using the most recent version of each. Basically, HSQL has added a new data type, BOOLEAN, which replaces BIT. But DBUnit is not updated to support this, and an error is throw when you attempt to insert