Hi All,
I have a database process written in PL/SQL that i would like to test using DBUNIT. The pl/sql program processes data from one table and generates new data into a new table. In some cases it also updates fields on the original table.
I am a bit confused in how i can use dbunit to test this. Reading up on it, it looks like i have to specify the data in an xml file but i cant figure out how to structure the xml files. Thinking about it i think i would need the following data files
- xml file containing data for tableA
- xml file containing data for tableB
- xml file containing data for updated tableA
The workflow is something like this
- Load tableA
- the pl/sql process will process the data and generate the results in tableB and update some fields in tableA
- Load xml file for tableB and compare the results.
I am slightly confused as to how dbunit can help with this. For example
- is the xml data loaded into memory and then compared to what is in TableB?
- how would i compare the updates to tableA?
Please also do let me know if you can suggest a better alternative or approach to do this.
Thanks