0 Replies Latest reply on Sep 18, 2012 6:14 PM by plexusnexus

    How to integrate Liquibase with Arquillian

    plexusnexus

      Dear all,

       

      I am looking for a way to intergrate Liquibase in my Arquillian-Setup in a better way as I do it now. We use Liquibase to create our database schema in our database server. Hence I need to run Liquibase before any unit test. Since test shouldn't depend on Maven (they must run in any IDE as well as with Maven) I decided to run Liquibase programmatically before Arquillian starts its test.

       

      My first approach was to run Liquibase from a method annotated with @BeforeSuite (I am using TestNG). Unfortunately this approach failed since Arquillian already uses @BeforeTest for TestNG based tests and this method was always excuted before my method.

       

      At the end I copied the Arquillian class for TestNG and added the stuff I needed. I don't like to do such things, since I have to maintain this copied class for every new Arquillian version.

       

      So the question is: Is there a better may to use Arquillian together with Liquibase?

       

      Bye,

       

      Oliver