title: Fixtures in Play! 2 for Scala
body: <p>I am trying to do some integration testing in a Play! 2 for Scala application. For this, I need to load some fixtures to have the DB in a known state before each test.</p>
  
  <p>At the moment, I am just invoking a method that executes a bunch of Squeryl statements to load data. But declaring the fixtures declaratively, either with a Scala DSL or in a language like JSON or YAML is more readable and easy to mantain.</p>
  
  <p>In <a href="https://github.com/playframework/Play20/blob/master/samples/java/zentasks/app/Global.java">this example</a> of a Java application I see that fixtures are loaded from a YAML file, but the <a href="https://github.com/playframework/Play20/blob/master/samples/scala/zentasks/app/Global.scala">equivalent Scala</a> app resorts to manula loading, as I am doing right now.</p>
  
  <p>I have also found <a href="https://github.com/rssh/fixture-state-management">this project</a> which is not very well documented, and it seems a bit more complex than I'd like - it is not even clear to me where the fixture data is actually declared.</p>
  
  <blockquote>
    <p>Are there any other options to load fixtures in a Play! application?</p>
  </blockquote>