We're doing our first project using the Play 2.0 framework in Scala. We are wondering if there was one (or more) existing best practices or libraries for generating the test data from the "GIVEN" sections of integration and end-to-end tests?
For example, in the Rails world, one might have a cucumber step GIVEN there are 10 users who like chocolate, which under the hood would use FactoryGirl or a similar library to generate those models in the database; you can then count on the test database being emptied between test runs automatically, and the tests run in a different database instance than your actual application.
In the Scala world using Play 2.0, we are considering using Anorm on MySQL. Should we special case our tests to use an in-memory database (taking care of clearing it), and write code to simply create and persist case classes in our GIVEN blocks?
Along the same lines, will the Play "evolutions" be run automatically to produce the production schema in the testing in-memory database?
Thanks for any help to avoid re-inventing wheels here.