Today, we found out how to do the unit testing in another scope, without altering the real data in on the server. First, we realized that in Maven2, the test source folder has it's own resource folder. We copied and changed values of the original hibernate.cfg.xml from MYSQL dialect to the HSQLDB dialect. This way the test can be run offline, without a test server.
As for the dbunit plugin, we can now run database backup and restoration through a maven command since the configuration data has been added to the POM.xml.
- To Backup: type "dbunit:export"
- To Restore: type "dbunit:operation"
The backup file will be taken from the "[project path]\backup\backup.xml" and it also restores from that location. This should be changed later to different files and should have the data automatically appended to the filename. The first database backup is on sourceforge documents. We also found out how to export the database schema in SQL programmatically. The schema is uploaded along with the backup of the database on sourceforge. We also commented some code in MDOManager as well as added the function to find by proximity.
No comments:
Post a Comment