I've made a small change to sqlunit 1.9 that makes it easier to use within an application rather than at "build" time. The patch is available at http://www.geekcoop.org/~jcej/sqlunit-1.9.patch
Justification: We have a nightly process that updates our production data. We want to run "data validation" tests after that process (or at other times) to make sure everything is good. We could integrate the tests into the nightly data manipulation process itself but reusing our sqlunit tests seems like a better idea.
The patch adds setFileName() and setConnection() methods to SQLUnit so that our app can set those at runtime. (We have container-managed datasources so we can't use the connection parameters in SQLUnit's XML file.)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks, James, maybe I should change the call from the sqlunit ant task to set the FileName using your setFileName() instead of using setLogFile() method. Holding off on the 2.2 release until I have had a chance to take a look at this.
-sujit
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Looked at your patch and incorporated it, its in CVS. I will like to bring some other things in line with it though. I am writing one such client (a SQLUnit GUI tool) Mohan wanted. But it would be nice to have this functionality for this as well.
Your changes will go out in the next release. Will keep you informed. You may want to upgrade to 2.2 when it comes out, since there are quite a few bug fixes since 1.9 (2.0 was a mess :-) but 2.1 seems to work fine...mostly :-).
-sujit
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've made a small change to sqlunit 1.9 that makes it easier to use within an application rather than at "build" time. The patch is available at http://www.geekcoop.org/~jcej/sqlunit-1.9.patch
Justification: We have a nightly process that updates our production data. We want to run "data validation" tests after that process (or at other times) to make sure everything is good. We could integrate the tests into the nightly data manipulation process itself but reusing our sqlunit tests seems like a better idea.
The patch adds setFileName() and setConnection() methods to SQLUnit so that our app can set those at runtime. (We have container-managed datasources so we can't use the connection parameters in SQLUnit's XML file.)
Thanks, James, maybe I should change the call from the sqlunit ant task to set the FileName using your setFileName() instead of using setLogFile() method. Holding off on the 2.2 release until I have had a chance to take a look at this.
-sujit
Looked at your patch and incorporated it, its in CVS. I will like to bring some other things in line with it though. I am writing one such client (a SQLUnit GUI tool) Mohan wanted. But it would be nice to have this functionality for this as well.
Your changes will go out in the next release. Will keep you informed. You may want to upgrade to 2.2 when it comes out, since there are quite a few bug fixes since 1.9 (2.0 was a mess :-) but 2.1 seems to work fine...mostly :-).
-sujit