Warning: Can't synchronize with repository "(default)" (/home/git/ome.git does not appear to be a Git repository.). Look in the Trac log for more information.
Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

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

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.

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).

Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.65581 sec.)

We're Hiring!