We have a case where we are testing a swing application. We have a QA person who up until now was doing manual testing of the app. Now we have realised that manual testing takes a long time to repeat and hence investing time into automated testing of our UI using Fest.
The other side of the coin is testing the database data. Meaning after doing some steps in the GUI, we need to check with the database if the data we expect is present there or not.
Since it’s a QA guy who is writing these unit tests for us, we would like to make it as easy as possible for him by providing some sort of framework in order to do this.
Is there some sort of a framework which will test the database against the data that we have? Something like an expected and actual as with JUnit’s assert.
Basically we are looking for a framework that has these features:
- The ‘expected’ data should be easy to provide like in a YAML, JSON, Excel Sheet, CSV way. XML and writing code to create beans in java is time consuming.
- We would like to create the expected data such that only the columns present in the expected data should be checked against the database.
- We don’t mind extending the framework to make it easy for a person who doesn’t know Java much to work with….
Dbunit looks like a solution for you.
DbUnit can also help you to verify that your database data match an expected set of values.