By an interesting coincidence, DBUnit released version 2.0 yesterday, so I
immediately installed it. The good news is that it didn’t require any
change in my code (probably because I am still in the early experimentation
stage at this point, but I understand that some major configuration changes have
That being said, my first contact with version 2.0 is not good at all.
For example, I made a typo in my XML dataset and misspelled a column name:
<PERSON last_nam = "Molinier" first_name = "David" middle_name = "L" />
With DBUnit 1.5.6, the punishment is immediate:
java.sql.SQLException: General error, message from server: "Column ‘last_name’
cannot be null"
(Note that the error is not that the column name is incorrect, which
is already not looking good).
But with DBUnit 2.0, the error is silently discarded and I end up with an
| last_name | first_name | middle_name |
| | David
| NULL |
Second, I can’t seem to be able to initialize the middle_name column, neither
with 1.5.6 nor with 2.0. No error message, no indication whatsoever of
what went wrong. Of course, I am pretty confident the spelling is right.
Strike three for DBUnit. Very disappointed.