Are you interested in Testaco? Please have a look at this blog post and tell me what you would like to see.

Testaco is a library meant to ease integration testing. The primary goal of testaco is to enable data driven testing and database refactoring.

Testaco springs from an idea that most tests that are written are too fine-grained to be of much use during refactoring efforts. Instead of helping the developer and stakeholders to see the application-level needs of the system, the focus is narrowed to the unit under test level, mostly at the level of individual classes or methods.

Reports have started to come out that using TDD (test driven design) may increase coupling instead of reducing it. I believe that is due to an excessive focus on details. If your tests are focused on the details, they will probably not help you evolve a good architecture over time. Therefore, I am a fan of Dan North and Behavior Driven Design (BDD), even if I think JBehave will be hard pressed to grab attention from JUnit. Those who have not tried to write tests using a BDD-like mindset are encouraged to give it a try.

Testaco is meant to become part of a test tool suite based on JUnit consisting of maybe a web test framework like Canoo, some kind of persistence testing framework like Testaco or Unitils, and some form of IDE plugin (The testaco eclipse plugin is the beginning of something like this) that speeds up and simplifies architectural-level refactorings. A tool suite like this should enable a team to build tests at the use case level. The upside is that the tests will not break (or break predictably) when a refactoring of the system is applied. The downside is that the tests will run slower and may be more fragile than unit tests.

So, Testaco is a database-focused tool. It seeks to improve some issues the author had with DBUnit while not getting in the way of being able to evolve the data model driving a system. So - all fuzzy concepts aside - how does it work?

Testaco is driven by annotations (and therefore requires Java 5). A test making use of testaco may look like the following

public class SimpleTest (...) {
 @LoadDb(datafile = "pre-test-contents.xml")
 @CheckDb(datafile = "expected-test-result.xml")
 public void testSomething() throws Exception {
   (...)
 }
}

These annotations loads the database when a test starts, or checks the database contents on test completion.

An eclipse plugin enables the user to resolve differences caused by code changes in these files.

There is also functionality in place that tracks database schema changes, and alerts the user whenever actions need to be taken.

News

2008-03-30

Are you interested in Testaco? Please have a look at this blog post and tell me what you would like to see.