Arquillian Liferay 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 Liferay component!

What is it?

Arquillian extension for Liferay is a set of tools to help developers test their Liferay plugins.

It consists of:

  • Arquillian Remote Container for Liferay (OSGi based)
  • Arquillian Deployment Scenario Generator for OSGi SDK plugins based on BND
  • Arquillian Deployment Scenario Generator for legacy Maven plugins

How to use it?

Arquillian Container for Liferay

is a regular remote container. Just add it to your test classpath.
It is based on Karaf remote container, so you can use the same configuration properties. However Liferay container changes some default values:

  • DEFAULT_JMX_SERVICE_URL = “service:jmx:rmi:///jndi/rmi://localhost:8099/jmxrmi”
  • DEFAULT_JMX_USERNAME = ""
  • DEFAULT_JMX_PASSWORD = ""
  • DEFAULT_HTTP_HOST = “localhost”
  • DEFAULT_HTTP_PORT = 8080
  • isAutostartBundle() == true

To configure your Liferay server you have to:

  • Enable JMX (for example: -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.port=8099 -Dcom.sun.management.jmxremote.ssl=false) in your application server
  • Deploy Aries JMX Extensions into Liferay Server
  • If you need more configuration options follow these instructions.

In case you are using Liferay Plugins SDK 6.2 CE and tomcat you can use the target “setup-testable-tomcat” to configure tomcat to accept tests.

Arquillian Deployment Scenario Generator for OSGi SDK plugins based on BND

If you are creating liferay OSGi plugins using plugins SDK simply add:

<dependency name="arquillian-deployment-generator-bnd" org="org.arquillian.liferay" rev="1.0.0.Alpha1" />

to your ivy.xml file and you don’t need to specify a @Deployment annotated static method in your test. The deployable archive will be generated for you using the plugin information in BND.

In case you need to specify a different BND file for the test archive use @BNDFile annotation to specify it.

You can find examples of use of these here:

Just notice that package name changes have occurred since the publication of these examples.

Arquillian Deployment Scenario Generator for legacy Maven plugins

Just the same as BND generator this extension allows you to create tests without having to specify a @Deployment static method. Test archive will be generated based on your pom.xml.

This extension is independent of the container. You can even configure it to use Tomcat to accept tests for legacy plugins.

More examples usage can be found in the showcase.

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 Liferay
Version 1.0.0.Alpha1 view tag
Release date 2015-02-01
Released by Aslak Knutsen
Compiled against

Published artifacts org.arquillian.liferay

  • org.arquillian.liferay » arquillian-container-liferay jar javadoc pom
  • org.arquillian.liferay » arquillian-deployment-generator-bnd jar javadoc pom
  • org.arquillian.liferay.maven » arquillian-liferay-maven-extension jar javadoc pom

Thanks to the following list of contributors: Carlos Sierra Andrés, Aslak Knutsen, Gregory Amerson, Kamesh Sampath