We were doing test-driven development but forgot about the tests!

Test equipment with probes

On a recent project our system had to use information maintained by another system. After discussing various ways of connecting the two systems - database views, web services, messaging - we decided that the team writing the other system would provide us with a compiled JAR that hid whatever jiggery-pokery they preferred behind a convenient API.

Up to this point, we had been mocking out their system and so already had interface definitions for the API. We even had tests that defined the behaviour we wanted from the implementation. The other team were happy to work from those tests and integrate them into their build to ensure that they didn't break the API in the future.

However, we forgot one important detail. Our end-to-end integration tests need to set up test data behind that API. The tests we handed over to the other team did not define an API for doing that. We now have no way of priming our tests with test data without being coupled to their database schema - the very thing we were trying to avoid.

Copyright © 2007 Nat Pryce. Posted 2007-04-10. Share it.