views:

35

answers:

0

If I have a test that requires X widgets as a precondition, I'd like to avoid the tedious process of making X widgets in the test through the front-end. The main alternatives appear to be either having a stated DB dump that is loaded for each test run, guaranteeing a pre-determined state (the dump file is generated by doing the preconditions manually and then dumping the resulting schema), or by using an ORM.

Given that all of our business logic sits at the application layer, replicating it with an ORM (Hibernate) has proven to be unwieldy. My Selenium framework is in Java, the app is in PHP using symfony.

What are the options? Have really long tests, somehow call symfony/PHP commands from Java, or have a difficult to maintain dump file in the repo? Should I be using transactions instead on a preset DB? It is key to optimize the trade off of test run-time and writing/maintenance simplicity. I've been looking at tools like DbUnit to perhaps help.