I have seen many people make use of the maven-sql-wordpress plugin to get this done. However it appears just like a task that's more appropriate for DBUnit....possibly at the outset of a whole test suite.

What is the best practice here?

I personally use the Maven SQL Plugin

Your much best utilizing it and ensuring you create and populate before your results after which drop after your results. You'll should also use create or replace, or drop if is available inside your creation script (presuming your database supports it) when an evaluation fails leaving the database in certain sporadic condition.

It required some fiddling around, however i first got it to decrease, create, and make the schema for H2 and MySQL. Still have to finish it for Oracle and SQL*Server 2008. I hidden the precise DROP and make instructions into qualities and perhaps (for example H2) required to skip the create database altogether. Here's what it appears like:

  <plugin>
    <!-- Used to automatically drop (if any) and create a database prior to running integration test cases. -->
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>sql-maven-plugin</artifactId>
    <dependencies>
      <dependency>
        <!-- Adds the correct JDBC driver as a dependency of this plugin -->
        <groupId>${database.groupId}</groupId>
        <artifactId>${database.artifactId}</artifactId>
        <version>${database.version}</version>
      </dependency>
    </dependencies>
    <configuration>
      <!-- common configuration shared by all executions -->
      <driver>${database.class}</driver>
      <username>${database.username}</username>
      <password>${database.password}</password>
      <url>${database.url}</url>
    </configuration>
    <executions>
      <execution>
        <!-- Start by dropping the database (we'll leave it intact when finished) -->
        <id>drop-db</id>
        <phase>pre-integration-test</phase>
        <goals>
          <goal>execute</goal>
        </goals>
        <configuration>
          <!-- Can't use regular URL in case database doesn't exists -->
          <url>${database.url.alternate}</url>
          <skip>${database.sqlDrop.skip}</skip>
          <autocommit>true</autocommit>
          <sqlCommand>${database.sqlDrop};</sqlCommand>
          <onError>continue</onError>
        </configuration>
      </execution>
      <execution>
        <!-- then create a new database -->
        <id>create-db</id>
        <phase>pre-integration-test</phase>
        <goals>
          <goal>execute</goal>
        </goals>
        <configuration>
          <!-- Can't use regular URL in case database doesn't exists -->
          <url>${database.url.alternate}</url>
          <skip>${database.sqlCreate.skip}</skip>
          <autocommit>true</autocommit>
          <sqlCommand>${database.sqlCreate};</sqlCommand>
          <onError>continue</onError>
        </configuration>
      </execution>
      <execution>
        <!-- and finally run the schema creation script we just made with the hibernate3-maven-plugin -->
        <id>create-schema</id>
        <phase>pre-integration-test</phase>
        <goals>
          <goal>execute</goal>
        </goals>
        <configuration>
          <skip>${database.sqlSchema.skip}</skip>
          <autocommit>true</autocommit>
          <srcFiles>
            <srcFile>target/hibernate3/sql/create-${database.vendor}-schema.sql</srcFile>
          </srcFiles>
          <onError>continue</onError>
        </configuration>
      </execution>
    </executions>
  </plugin>