Arquillian Persistence Extension 1.0.0.Alpha3 Released

Since we wrote this post we didn't laze around. Check our latest announcement.

The Arquillian team is proud to announce the 1.0.0.Alpha3 release of the Arquillian Persistence Extension component!

Some of the highlights in this release

Support for JSON. If you prefer this well known format over YAML/EXCEL/XML, you can now define your data sets in JSON too!

users.json
{
    "useraccount":
    [
        {
            "id" : 1,
            "firstname" : "John",
            "lastname" : "Smith",
            "username" : "doovde",
            "password" : "password"
        },
        {
            "id" : 2,
            "firstname" : "Clark",
            "lastname" : "Kent",
            "username" : "superman",
            "password" : "kryptonite"
        }
    ]
}

Introduced ability to seed database using plain SQL scripts.

@Test
@UsingScript("users.sql")
@ShouldMatchDataSet("expected-users.yml")
public void shouldChangeUserPassword() throws Exception {
    // given
    String expectedPassword = "LexLuthor";
    UserAccount user = em.find(UserAccount.class, 2L);

    // when
    user.setPassword("LexLuthor");
    em.merge(user);

    // then
    assertThat(user.getPassword()).isEqualTo(expectedPassword);
}

New feature – Apache POI exclusion. If you are not using excel based data sets you can exclude
Apache POI archive in arquillian.xml file. This will reduce deployment size quite significantly.

arquillian.xml
<extension qualifier="persistence">
    <property name="excludePoi">true</property>
</extension>

Fixed WAR and EAR packaging.

What is Arquillian?

Arquillian is open source software that empowers you to test JVM-based applications more effectively. Created to defend the software galaxy from bugs, Arquillian brings your test to the runtime so you can focus on testing your application's behavior rather than managing the runtime. Using Arquillian, you can develop a comprehensive suite of tests from the convenience of your IDE and run them in any IDE, build tool or continuous integration environment.

Release details

Component Arquillian Persistence Extension
Version 1.0.0.Alpha3 view tag
Release date 2011-12-30
Released by Aslak Knutsen
Compiled against

Published artifacts org.jboss.arquillian.extension

  • org.jboss.arquillian.extension » arquillian-persistence-api jar javadoc pom
  • org.jboss.arquillian.extension » arquillian-persistence-impl jar javadoc pom
  • org.jboss.arquillian.extension » arquillian-persistence-integration-tests jar javadoc pom

Release notes and resolved issues 6

Enhancement
  • ARQ-693 - Custom SQL statements / scripts to be run before and after test execution
Feature Request
  • ARQ-694 - Seeding database using SQL scripts
  • ARQ-695 - Investigate possibility of excluding Apache POI library
  • ARQ-711 - Add support for JSON data sets
Bug
  • ARQ-685 - Failing to locate datasets when deploying as WAR archive.

Thanks to the following list of contributors: Bartosz Majsak, Aslak Knutsen