Category: testing

  • Deep testing of integrations with Camel

    One of the things that often comes up in client conversations about developing integration code with Camel is what test support is available, and more to the point appropriate, for testing integrations. There is a spectrum of test types that can be performed, ranging from fully automated unit tests to full-blown multi-system, user-based “click and…

  • A Better Builder

    The builder pattern should be familiar to anyone who has needed to change data from one format to another. Often called assemblers, translators or similar, they’re found peppered throughout almost every project. The idea is pretty simple: It’s OK for translating small object graphs, but for non-trivial work, these things can turn into huge heaving…

  • Testing the Untestable

    Once upon a time you got sick of writing code and having it fail when you ran, or someone else did, and you learned to unit test your code. You read the JUnit docs, and wrote tests for those classes which contained discrete, self-contained code. And quickly realised that the world doesn’t work like that.…

  • Unit Testing the Database Tier

    Unit testing database code is a bit of a funny problem. Most developers can pretty easily get their heads around unit testing a piece of Java code using interfaces and mock objects. When it comes to database code or DAOs, it suddenly becomes particularly difficult. But why, what is so difficult about testing stuff against…

  • How crap is your code?

    Now you can find out with Crap4J. Can wait to run some projects through it. I’m curious as to what the code quality looks like on some of the larger Open Source projects (Dom4J looks pretty good though). I love stats. I don’t know what it is. They’re like horoscopes, or something. Pinch of salt…

  • Unit testing made simpler(!)

    What is simpler than writing a JUnit test? Getting someone else to write them for you! The really nice people at Agitar Software have developed a couple of tools as part of their “No Java Class Left Behind” programme, that will write JUnit tests for your existing code to prove that it works as expected.…

  • How to test the middle tier of a Spring application

    Since the advent of dependency injection (DI) as a staple of enterprise development using tools such as Spring or Guice, your code has become a lot easier to test. You no longer need to code up voodoo such as plugging in dummy resource locators or the like based on some random environment variable to tell…