Dan is an open source advocate, community catalyst, author and speaker. He's currently pursuing these interests as a Principal Software Engineer at Red Hat. In that role, he serves as a JBoss Community liaison, contributes to several JBoss Community projects, including Arquillian, ShrinkWrap, Seam 3 / DeltaSpike and JBoss Forge, and participates in the JCP on behalf of Red Hat. Dan is the author Seam in Action (Manning, 2008), writes for IBM developerWorks, NFJS magazine and JAXenter and is an internationally recognized speaker. He's presented at major software conference series including JavaOne, Devoxx, NFJS, JAX and Jazoon. After a long conference day, you'll likely find Dan enjoying tech talk with fellow community members over a Belgian Trappist beer. Dan has posted 5 posts at DZone. You can read more from them at their website. View Full User Profile

Death to all bugs! Arquillian testing platform reaches first stable release

04.10.2012
| 9131 views |
  • submit to reddit
Red Hat, Inc. and the JBoss Community today announced the 1.0.0.Final release of Arquillian, its award-winning testing platform built to run on the Java Virtual Machine (JVM). Arquillian substantially reduces the effort required to write and execute Java middleware integration and functional tests. It even enables test engineers to address scenarios previously considered untestable or too expensive to test.

The Arquillian project is led by Aslak Knutsen and has received contributions from over 100 community members. At the JavaOne 2011 conference, Arquillian received the Duke's Choice Award for innovation in integration testing.

The 1.0.0.Final release of Arquillian Drone, a key add-on to the platform, is included in this release. Final versions of select container adapters will be released later in the week. ShrinkWrap, a key component of Arquillian, announced its 1.0.0.Final release last week.

Mission and History


Arquillian adheres to three core principles:

  1. Tests should be portable to any supported container
  2. Tests should be executable from the IDE to eliminate the need for an explicit build step and to simplify debugging
  3. The platform should unify the Java testing ecosystem by extending or integrating with existing test frameworks

By focusing on these principles, Arquillian makes integration and functional tests as simple to write and execute as unit tests.

Arquillian originated from the test harness developed for the CDI 1.0 (JSR-299) specification in 2009. It spun off as an independent project and has evolved into an extensible testing platform. Coming full circle, the test suite in CDI 1.1 (JSR-346), the next iteration of the CDI specification, has migrated to Arquillian. Other specifications are expected to follow. Arquillian is also used by numerous open source projects, including Hibernate, JBoss AS 7, Drools, RHQ, JClouds and Apache DeltaSpike.

Functionality


Arquillian brings test execution to the target runtime, alleviating the burden on the developer of managing the runtime from within the test or project build. To invert this control, Arquillian wraps a lifecycle around test execution that does the following:

  • Manages the lifecycle of one or more containers
  • Bundles the test case, dependent classes and resources as ShrinkWrap archives
  • Deploys the archives to the containers
  • Enriches the test case with dependency injection and other declarative services
  • Executes the tests inside (or against) the containers
  • Returns the results to the test runner for reporting

Arquillian runs with Java 1.5 and above, integrates seamlessly with familiar testing frameworks such as JUnit and TestNG and allows tests to be launched using existing IDE, Ant and Maven test plugins.

Loving quotes about Arquillian

“...using Arquillian, we were able to cut the setup needed to run a plugin in-container by 90% and we were able to introduce a number of convenience annotations from which you can get a variety of data injected into your tests.”

-- Lukáš Krejčí, RHQ core developer

“Arquillian is a really great integration testing tool full of potential. It's just great that the JBoss guys are aiming to provide support for almost all widely used application servers and web containers. If you are writing an application for the Java EE 6 stack, not using Arquillian is a serious mistake!”

-- Bartosz Majsak, Cambridge Technology Partners

“[Arquillian] reminds me of the old Cactus project back in the day, but done much, much better.”
 -- Laird Nelson

Newest features


Arquillian can manage more than a dozen container vendors, including JBoss AS, GlassFish and Tomcat, and supports running tests in cloud services. The container support allows developers to target a variety of technology platforms, including Java EE 5 and 6, Servlet environments, OSGi, Embedded EJB and standalone CDI.

Additional new features include:

  • Orchestration of multiple deployments across multiple containers in a single test
  • Support for multiple protocol contexts within a single deployment
  • Descriptor deployment
  • Assertions for deployment exceptions
  • A new configuration schema that supports multiple configurations per container
  • EL-like evaluation in properties and configuration overrides via Java properties
  • Explicit ordering of test methods
  • Control over when the container is started and stopped

Arquillian’s extensibility is reflected in its growing ecosystem of extensions. The most mature extension, Arquillian Drone, is included in today’s release. Drone is an abstraction over browser controllers such as Selenium and WebDriver that enables the developer to write browser-based tests without having to fuss with the typical setup and plumbing. Other extensions under active development include an Android test controller, DBUnit integration, a SeamTest replacement for testing Seam 2, BDD runners (Spock and JBehave), performance metrics, code coverage (Jacoco) and Arquillian Graphene (a type-safe Selenium API). Expect more extensions to emerge now that the platform has reached a stable release.

Availability


The Arquillian platform and extensions are available in the Maven Central and JBoss Community artifact repositories. The Arquillian libraries are typically added to the test suite of a project using a dependency management tool such as Apache Maven or Apache Ivy. Instructions for setting up Arquillian in your project and writing Arquillian tests are covered in the newly-minted Arquillian Guides.

Arquillian is released under the Apache License, v2.0, an OSI-approved open source software license.

For more information and updates about the Arquilian project, visit arquillian.org and circle the Arquillian project on Google+.
Published at DZone with permission of its author, Dan Allen.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)

Comments

Liam Knox replied on Wed, 2012/04/11 - 8:32am

Does it do anything ? Who uses it ? Ceylon or so long ?

Mitch Pronschinske replied on Wed, 2012/04/11 - 1:43pm in response to: Liam Knox

Here's a good post from a JL community member:  http://java.dzone.com/articles/arquillian-end-test-hell-earth

But the best answer I can give is here.

Magnus Smith replied on Thu, 2012/04/12 - 3:32am in response to: Liam Knox

@Liam

Ceylon might be crap but Arquillian really rocks! It is a major achievement in reducing the time and complexity of integration testing.  Go try it.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.