We would like to start work on DbUnit 3.0 at some point.
This release will be a major overhaul of the framework, bringing it up to date with current technologies and standard industry practice.
This release will likely break compatibility to some extent. To what extent exactly is up for debate.
Java 5.0 Compatible
- Consider 6 as 5 is already EOL (OK, but what is different about 6 from 5? JDBC 4.0? Any other differences relevant to DbUnit?)
- Applicable to DbUnit?
- Use cases/Suggestions?
- Static imports + varargs for convenience methods, e.g. inline data for tests?
- Connection management
- How to use DbUnit via composition rather than inheritance
- DbUnit should be natural to use from JUnit 3.8, JUnit 4.x or TestNG
- DbUnit should be natural to use in conjunction with Spring Test Context framework and similar
- Builders applied consistently throughout code base (with fluent interface)
- Listeners/events applied consistently through code base (if indeed we even use them!)
- I/O applied consistently — InputStreamSources??? (from Spring Resource Framework) Google Guava approach?
- Get rid of RowOutOfBoundsException anti-pattern
- Consistent, intuitive connection management (for those that do/don't want rollback in tearDown(), etc)
- Change to using unchecked RuntimeExceptions?
- Design use so is easier to create tests.
- load data files.
- easily work with DI containers.
- consider creating annotation set for tests.
- Add concept of "expected data".
- dbUnit already has "prep data" concept with getDataSet(). Since most tests also have expected data, formally support it and differentiate between the two, e.g. getPrepData(), getExpectedData().
- continue concept of CompositeDataSet - ability to merge multiple source data sets into one. This is important when organizing common data sets for prep and expected.
- Easy to use a product's DAOs, JPA, etc. vs special SQL for dbUnit.