I want to write tests for our internal Seam Framework-based website search engine that uses Hibernate + Lucene (for DB2) indexes for queries. What is the best solution to populate the data source before starting the TestNG package, when the project data model is quite complex, given the relationship of entities and field restrictions? For some test cases, at least a dozen database tables would require rows related to each other to adhere to the limitations of the data model. Ideally, Hypersonic will be used as in-memory use will reduce the execution time of our build process.
I hope my question is clear, since it is difficult to formulate a complete picture of my problem without throwing a massive wall of descriptive text and proprietary code. In principle, creating each object programmatically (creating instances of all objects using the Hibernate Home object, setting each property, saving the data source and making the transaction in FacesRequest @Test) is too cumbersome, given the data model and populate.sql script we already wrote (and are executed on DB2 to run a local website hosted on JBoss locally) cannot be used on Hypersonic! And every TestNG example that I come across on the Internet or in books contains roughly simple data sets that do not indicate a clear approach to my problem.
source
share