Arquillian Drone Extension 1.0.0.CR4 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.CR4 release of the Arquillian Drone Extension component!

Some of the highlights in this release

Upgraded underlying Selenium to 2.20.0

Simplified usage for Arquillian Drone with WebDriver and Selenium. We provide dependency chain artifacts which will grab all required dependencies. Use either one of them you need, both of them or even combined with Arquillian Graphene.

pom.xml
<dependencyManagement>
    <dependencies>
        <!-- clip -->
        <dependency>
            <groupId>org.jboss.arquillian.extension</groupId>
            <artifactId>arquillian-drone-bom</artifactId>
            <version>1.0.0.CR4</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>    
<dependencies>
    <!-- clip -->
    <!-- this is only dependency you need to add 
         in order to use Arquillian Drone with WebDriver in your project --> 
    <dependency>
        <groupId>org.jboss.arquillian.extension</groupId>
        <artifactId>arquillian-drone-webdriver-depchain</artifactId>
        <version>1.0.0.CR4</version>
        <type>pom</type>
        <scope>test</scope>
    </dependency>      
    <!-- clip -->
    <!-- this is only dependency you need to add 
         in order to use Arquillian Drone with Selenium in your project --> 
    <dependency>
        <groupId>org.jboss.arquillian.extension</groupId>
        <artifactId>arquillian-drone-selenium-depchain</artifactId>
        <version>1.0.0.CR4</version>
        <type>pom</type>
        <scope>test</scope>
    </dependency>     
</dependencies>

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 Drone Extension
Version 1.0.0.CR4 view tag
Release date 2012-03-27
Released by Aslak Knutsen
Compiled against

Published artifacts org.jboss.arquillian.extension

  • org.jboss.arquillian.extension » arquillian-drone-bom pom
  • org.jboss.arquillian.extension » arquillian-drone-selenium-depchain pom
  • org.jboss.arquillian.extension » arquillian-drone-webdriver-depchain pom
  • org.jboss.arquillian.extension » arquillian-drone-api jar javadoc pom
  • org.jboss.arquillian.extension » arquillian-drone-spi jar javadoc pom
  • org.jboss.arquillian.extension » arquillian-drone-configuration jar javadoc pom
  • org.jboss.arquillian.extension » arquillian-drone-impl jar javadoc pom
  • org.jboss.arquillian.extension » arquillian-drone-selenium-server jar javadoc pom
  • org.jboss.arquillian.extension » arquillian-drone-selenium jar javadoc pom
  • org.jboss.arquillian.extension » arquillian-drone-webdriver jar javadoc pom

Release notes and resolved issues 5

Component Upgrade
  • ARQ-749 - Update JBoss Parent to 8
  • ARQ-750 - Update Selenium version to 2.20.0
  • ARQ-820 - Update Arquillian Core to 1.0.0.CR7
Enhancement
  • ARQ-821 - Provide a dependency chain to make usage of Drone with Selenium and WebDriver easier

Thanks to the following list of contributors: Karel Piwko, Aslak Knutsen

Graphene 1.0.0.CR3 Released & How To Migrate from Ajocado

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.CR3 release of the Graphene component!

The project Ajocado has been renamed to Graphene.

The first release under the new name waits for you in Maven repositories.

Migration Path

Fortunately, the migration to new name in your project is very smooth, you can even continue to use original APIs.

Java Classes

The packages of the Java classes have not been renamed, the only change is addition of three new interfaces/utilities and deprecation of the old ones:

  • Ajocado → Graphene
  • AjaxSelenium → GrapheneSelenium
  • AjocadoConfiguration → GrapheneConfiguration
  • AjocadoContext → GrapheneSeleniumContextM
  • AjocadoConfigurationContext → GrapheneConfigurationContext

The original names has been deprecated, but it doesn’t prevent to use current tests as they are – the deprecated classes will continue to be part of the project.

Configuration

The simple change in the arquillian.xml descriptor is needed, you just need to change ajocado to graphene:

<extension qualifier="graphene">
    ...
</extension>

Maven Artifacts

The most significant change underwent dependency system, so let me talk a more little bit about that:

In Ajocado CR2, there was only one dependency necessary to import all the JUnit/TestNG and all Arquillian dependencies.

In Graphene CR3, you need to manage several dependencies – however it makes your usage of dependencies little more cleaner, since you know exactly what dependencies are imported.

At first, you need to import JUnit/TestNG dependency:

Test Framework

JUnit

<dependency>
    <groupId>junit</groupId>
    <artifactId>junit</artifactId>
    <version>4.8.2</version>
    <scope>test</scope>
</dependency>

TestNG

<dependency>
    <groupId>org.testng</groupId>
    <artifactId>testng</artifactId>
    <version>5.14.6</version>
    <scope>test</scope>
</dependency>

Additionally, you need to choose between using Graphene as standalone or use Arquillian integration with containers:

Standalone Usage

In this mode, you don’t use integration with containers, you need to manage the container and deployment at own:

Arquillian JUnit Standalone

<dependency>
    <groupId>org.jboss.arquillian.junit</groupId>
    <artifactId>arquillian-junit-standalone</artifactId>
    <version>1.0.0.CR7</version>
    <scope>test</scope>
</dependency>

Arquillian TestNG Standalone

<dependency>
    <groupId>org.jboss.arquillian.testng</groupId>
    <artifactId>arquillian-testng-standalone</artifactId>
    <version>1.0.0.CR7</version>
    <scope>test</scope>
</dependency>

Container usage

In the container mode, you need to provide deployable archive (@Deployment) and the whole lifecycle of the container and deployment will be managed by Arquillian:

Arquillian JUnit Container

<dependency>
    <groupId>org.jboss.arquillian.junit</groupId>
    <artifactId>arquillian-junit-container</artifactId>
    <version>1.0.0.CR7</version>
    <scope>test</scope>
</dependency>

Arquillian TestNG Container

<dependency>
    <groupId>org.jboss.arquillian.testng</groupId>
    <artifactId>arquillian-testng-container</artifactId>
    <version>1.0.0.CR7</version>
    <scope>test</scope>
</dependency>

Graphene Dependency Chain

And finally it’s necessary to import Arquillian Graphene dependency chain, which includes all other necessary dependencies (Graphene, Drone, Selenium):

Graphene Dependency Chain

<dependency>
    <groupId>org.jboss.arquillian.graphene</groupId>
    <artifactId>arquillian-graphene</artifactId>
    <version>1.0.0.CR3</version>
    <type>pom</type>
    <scope>test</scope>
</dependency>

What’s next?

We are preparing to release Final later soon, the same as other dependencies in Arquillian ecosystem.

Thanks all the people who helped to test migration (Jan Papousek, Karel Piwko), so it is now pretty smooth.

Project Links

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 Graphene
Version 1.0.0.CR3 view tag
Release date 2012-03-15
Released by Lukas Fryc
Compiled against

Published artifacts org.jboss.arquillian.graphene

  • org.jboss.arquillian.graphene » arquillian-graphene-parent pom
  • org.jboss.arquillian.graphene » arquillian-graphene-api jar javadoc pom
  • org.jboss.arquillian.graphene » arquillian-graphene-impl jar javadoc pom
  • org.jboss.arquillian.graphene » arquillian-graphene-drone jar javadoc pom
  • org.jboss.arquillian.graphene » arquillian-graphene pom

Release notes and resolved issues 15

Component Upgrade
  • ARQGRA-21 - Upgrade Arquillian Core, Arquillian Drone and Shrinkwrap
  • ARQGRA-23 - Upgrade to JBoss Parent version 8
Enhancement
  • ARQGRA-32 - Remove javassist dependency
  • ARQGRA-33 - Classes Point, Dimension and Offset should override default equals and hashCode
  • ARQGRA-36 - Split arquillian-testng/junit to support -standalone and -container version
Feature Request
  • ARQGRA-54 - Thread-Local Contexts section in docs should be more clean even for people not so familiar with given topic
  • ARQGRA-59 - support for configurating arquillian.xml during runtime for matrix browser compability jobs
  • ARQGRA-61 - Umbrella: Rename the project to Graphene
Task
  • ARQGRA-97 - Remove repositories definition from pom.xml
  • ARQGRA-106 - Review usage of Shrinkwrap version definition
Sub-task
  • ARQGRA-88 - Test migration path for renaming Ajocado to Graphene
  • ARQGRA-89 - Rename project to Graphene - wiki/docs
  • ARQGRA-90 - Blog about renaming to Graphene
  • ARQGRA-91 - Rename JIRA project name to ARQGRA
  • ARQGRA-92 - Rename GitHub repository to arquillian-graphene

Thanks to the following list of contributors: Lukas Fryc, Juraj Huska, Karel Piwko, Pavol Pitonak

Arquillian Extension Byteman 1.0.0.Alpha1 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.Alpha1 release of the Arquillian Extension Byteman component!

We’re happy to announce the first release of the Arquillian Byteman marriage.

Byteman is a tool which simplifies tracing and testing of Java programs. Byteman allows you to insert extra Java code into your application, either as it is loaded during JVM startup or even after it has already started running. The injected code is allowed to access any of your data and call any application methods, including where they are private. You can inject code almost anywhere you want and there is no need to prepare the original source code in advance nor do you have to recompile, repackage or redeploy your application. In fact you can remove injected code and reinstall different code while the application continues to execute.

When testing your application you can use Byteman to inject faults or synchronization code, causing your application to perform unusual or unexpected operations required to exercise a test scenario.

In this release we added support the @BMRule(s) annotation on Class and Method level.

@RunWith(Arquillian.class)
@BMRules(
        @BMRule(
                name = "Throw exception on success",
                targetClass = "StatelessManagerBean",
                targetMethod = "success",
                action = "throw new java.lang.RuntimeException()")
)
public class BytemanFaultInjectionTestCase {

    @Deployment
    public static Archive<?> createDeployment() {
        return ShrinkWrap.create(WebArchive.class)
                .addClasses(StatelessManager.class, StatelessManagerBean.class);
    }
...
}
@Test(expected = EJBException.class)
@BMRule(
        name = "Throw exception on success",
        targetClass = "StatelessManagerBean",
        targetMethod = "success",
        action = "throw new java.lang.RuntimeException()")
public void shouldBeAbleToInjectMethodLevelThrowRule()
{
    Assert.assertNotNull("Verify bean was injected", bean);
    bean.success();
}

See the Byteman Website for more on how to write rules.

Before we reach the final release we are planning to bring @BMScript annotation and manual installment of rules during test execution.

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 Extension Byteman
Version 1.0.0.Alpha1 view tag
Release date 2012-01-19
Released by Aslak Knutsen
Compiled against

Published artifacts org.jboss.arquillian.extension

  • org.jboss.arquillian.extension » arquillian-extension-byteman jar javadoc pom

Release notes and resolved issues 2

Simple support for Rules annotations

Feature Request
  • ARQ-348 - Create a Byteman integration

Thanks to the following list of contributors: Aslak Knutsen

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

Arquillian Persistence Extension 1.0.0.Alpha2 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.Alpha2 release of the Arquillian Persistence Extension component!

Some of the highlights in this release

Renamed @Data and @Expected annotation to more meaningful @UsingDataSet and @ShouldMatchDataSet.

datasets folder is now a default location for all data set files. Files specified in @UsingDataSet and @ShouldMatchDataSet will be first lookup in this directory. If not found search will be performed starting from root folder.

@Test
@UsingDataSet("users.yml")
@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 of dumping database state during test execution has been added. Following phases are covered:

  • Before seed (before test execution).
  • After seed (before test execution).
  • Ater test.
  • After clean.

This can be configured in arquillian.xml as follows:

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

@Transactional support can be now used standalone either on class or test method level.

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.Alpha2 view tag
Release date 2011-12-03
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 8

API review

Enhancement
  • ARQ-680 - Separate DBUnit DatabaseConnection creation in dedicated event.
  • ARQ-681 - Rename dataset annotations
  • ARQ-682 - Introduce convention for datasets files lookup from datasets folder first.
Feature Request
  • ARQ-653 - Add Persistence configuration to Archive instead of client callback
  • ARQ-654 - Change Persistence TransactionStarted event to StartTransaction
Bug
  • ARQ-662 - Error when running a test that is not related to persistence extension
  • ARQ-663 - @Expected annotation giving false positives due to improper usage of DBUnit assertions

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