User Story #122 (closed)
Opened 18 years ago
Closed 18 years ago
Need mechanism to load data before integration tests.
Reported by: | jamoore | Owned by: | jamoore |
---|---|---|---|
Priority: | minor | Milestone: | 3.0-M3 |
Component: | Deployment | Keywords: | testing,sql,iteration1 |
Cc: | Story Points: | n.a. | |
Sprint: | n.a. | Importance: | n.a. |
Total Remaining Time: | n.a. | Estimated Remaining Time: | n.a. |
Description
Currently the query tests in ome.server.itests.query (LoadContainersHierarchyQueryTest and friends) rely on the create_pojos.sql file in that same directory. Otherwise they fail.
There needs to be a system for automatically loading all SQL (or other data format like HibernateQL) based on some name pattern matching (create_*.sql) or similar before integration tests are run.
One other option would be to have this data be stored as groovy (with HQL calls) rather than pure SQL for better portability.
Change History (3)
comment:1 Changed 18 years ago by jmoore
comment:2 Changed 18 years ago by jmoore
- Milestone set to 3.0-M3
- Version changed from 3.0-M1 to 3.0-M2
This is now a problem with the *.sql files under server/test/ome/server/itests/query. Needs to be fixed by using TestNg? facilities.
comment:3 Changed 18 years ago by jmoore
- Keywords iteration1 added
- Resolution set to fixed
- Status changed from new to closed
r770 removes the hand-coded sql files and in turn uses testng facilities (as mentioned) to create data only once using CreatePojosFixture. The caveat is that this is done for each subclass using the fixture. It would be nice if this could be static (once per JVM not once per subclass).
This could be done with a @Configuration(beforeSuite = true) (see http://blog.hibernate.org/cgi-bin/blosxom.cgi/2005/11/24). One possibility is to have the beforeSuite method call a groovy script to make the data format as simple as possible.