Arquillian Liferay 1.0.0.Alpha2 Released

The Arquillian team is proud to announce the 1.0.0.Alpha2 release of the Arquillian Liferay component!

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.Alpha2 view tag
Release date 2015-11-24
Released by Aslak Knutsen
Compiled against

Published artifacts org.arquillian.liferay

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

Release notes and resolved issues 26

Other

Thanks to the following list of contributors: Cristina González Castellano, Carlos Sierra Andrés, Manuel De La Peña, Shuyang Zhou, Aslak Knutsen

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

Arquillian Portal Extension 1.1.0.Alpha1 Released

The Arquillian team is proud to announce the 1.1.0.Alpha1 release of the Arquillian Portal Extension component!

You may have noticed that we jumped from 1.0.0.CR1 to 1.1.0.Alpha1! No, we’re not going crazy, but given the stability inherit within 1.0.0.CR1 and the changes we were
looking to introduce into the extension, it made sense to bump the version to 1.1.0.

This release contained quite a large amount of changes, compared to previously.

Some of the highlights in this release

GateIn and Pluto portlet container implementations are now included as implementations of the portal extension instead of being in separate repositories.

Add the ability to run integration testing against the portlet containers, and different servlet containers.

Extend Warp to cater for regular and JSF Portlets.

Warp extensions for portlets

For non JSF portlets we can specify an Inspection method with either @BeforePortletPhase or @AfterPortletPhase to specify whether we want to the method executed before or after the particular PortletRequest specified by the value on the annotation. An example of executing an inspection after a RenderRequest would be:

@AfterPortletPhase(Phase.RENDER)
public void afterRender() {
    assertTrue(true);
}

It’s also possible to inject the request and response objects into the Inspection. You can choose to either use a generic PortletRequest or more specific request types based on the portlet lifecycle phase, such as ActionRequest. Here’s an example:

@ArquillianResource
ActionResponse actionResponse;

@BeforePortletPhase(Phase.ACTION)
public void beforeActionRequest() {
    String[] values = actionResponse.getRenderParameterMap().get("data");
    assertNull("Render parameter for data should not be set.", values);
}

@AfterPortletPhase(Phase.ACTION)
public void afterActionRequest() {
    String[] values = actionResponse.getRenderParameterMap().get("data");
    assertTrue("Render parameter for data should be set.", values.length == 1);
    assertEquals("Render parameter set to incorrect value.", BasicPortlet.ACTION, values[0]);
}

For JSF portlets we can still use @BeforePortletPhase and @AfterPortletPhase, but these don’t allow us to inspect the JSF lifecycle. To perform inspection on the JSF lifecycle, we need to use @PortletPhase in combination with the JSF lifecycle annotations from Warp. To inspect when JSF changes the value of a bean on form submission for a portlet:

@ManagedProperty("")
Bean bean;

@PortletPhase(ACTION) @BeforePhase(Phase.UPDATE_MODEL_VALUES)
public void testBeanValueBeforeUpdate() {
    assertEquals("Bean value should not be updated yet.", "originalValue", bean.getText());
}

@PortletPhase(ACTION) @AfterPhase(Phase.UPDATE_MODEL_VALUES)
public void testBeanValueAfterUpdate() {
    assertEquals("Bean value should now be updated.", "newValue", bean.getText());
}

One point of note when writing Warp tests for portlets is that most portlet containers perform a redirect after an Action or Event request, but before the portlet is rendered. To be able to inspect on both an Action and Render request, we need to use Warp request groups:

Warp
    .initiate(new Activity() {
        public void perform() {
            // Do something
        }
    })
    .group()
        .observe(request().index(1))
        .inspect(new Inspection() {
            private static final long serialVersionUID = 1L;

            @PortletPhase(ACTION) @BeforePhase(Phase.UPDATE_MODEL_VALUES)
            public void testBeanValueBeforeUpdate() {
                // Asserts
            }
        })
    .group()
        .observe(request().index(2))
        .inspect(new Inspection() {
            private static final long serialVersionUID = 1L;

            @PortletPhase(RENDER) @BeforePhase(Phase.RENDER_RESPONSE)
            public void testBeanValueBeforeRenderResponse() {
                // Asserts
            }
        })
    .execute();

We look forward to hearing your feedback about this release in the community forums!

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 Portal Extension
Version 1.1.0.Alpha1 view tag
Release date 2013-10-31
Released by Ken Finnigan
Compiled against

Published artifacts org.jboss.arquillian.extension

  • org.jboss.arquillian.extension » arquillian-portal-shrinkwrap-api jar javadoc pom
  • org.jboss.arquillian.extension » arquillian-portal-shrinkwrap-impl jar javadoc pom
  • org.jboss.arquillian.extension » arquillian-portal-api jar javadoc pom
  • org.jboss.arquillian.extension » arquillian-portal-spi jar javadoc pom
  • org.jboss.arquillian.extension » arquillian-portal-impl-base jar javadoc pom
  • org.jboss.arquillian.extension » arquillian-portal-impl-gatein jar javadoc pom
  • org.jboss.arquillian.extension » arquillian-portal-impl-pluto-container jar javadoc pom
  • org.jboss.arquillian.extension » arquillian-portal-impl-pluto-jetty-bom pom
  • org.jboss.arquillian.extension » arquillian-portal-impl-pluto-jsf jar javadoc pom
  • org.jboss.arquillian.extension » arquillian-portal jar javadoc pom
  • org.jboss.arquillian.extension » arquillian-portal-warp-api jar javadoc pom
  • org.jboss.arquillian.extension » arquillian-portal-warp-portlet jar javadoc pom
  • org.jboss.arquillian.extension » arquillian-portal-warp-jsf jar javadoc pom

Release notes and resolved issues 4

Feature Request
  • ARQ-1539 - Support for Warp testing with Portlets
Task
  • ARQ-1540 - Migrate implementations into Portal Extension
  • ARQ-1542 - Add integration testing to portal extension

Thanks to the following list of contributors: Ken Finnigan

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

There are several important fixes in this release for those testing portlets with Arquillian.

Some of the highlights in this release

Fix exceptions where there are multiple portlet deployments present on a Test class.

Allow @PortalURL to be present on a test method parameter, in addition to a field.

Modify the parsing of portlet.xml to occur for each test instead of once per Test class.

We look forward to hearing your feedback about this release in the community forums!

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 Portal Extension
Version 1.0.0.CR1 view tag
Release date 2013-09-20
Released by Ken Finnigan
Compiled against

Published artifacts org.jboss.arquillian.extension

  • org.jboss.arquillian.extension » arquillian-portal-api jar javadoc pom
  • org.jboss.arquillian.extension » arquillian-portal-spi jar javadoc pom
  • org.jboss.arquillian.extension » arquillian-portal-impl jar javadoc pom
  • org.jboss.arquillian.extension » arquillian-portal jar javadoc pom
  • org.jboss.arquillian.extension » arquillian-portal-shrinkwrap-api jar javadoc pom
  • org.jboss.arquillian.extension » arquillian-portal-shrinkwrap-impl jar javadoc pom

Release notes and resolved issues 4

Bug
  • ARQ-1484 - ConcurrentModificationException when TestClass contains multiple Portlet Archive Deployments
  • ARQ-1485 - PortletXMLProcessor does not check for PortalURL annotation on test method parameters
  • ARQ-1486 - Parsing of portlet.xml needs to occur for a deployment to provide correct list of available portlets for a test

Thanks to the following list of contributors: Ken Finnigan

Arquillian Seam 2 Extension 1.0.0.Beta1 Released

The Arquillian team is proud to announce the 1.0.0.Beta1 release of the Arquillian Seam 2 Extension component!

We have bunch of small but important improvements in our extension for all Seam 2 users out there.

Some of the highlights in this release

Injection of Identity is now supported in the Arquillian powered tests.

Your tests can now exercise conversation scoped components!

Seam 2.3 and JBoss AS 7 are now covered by our test suite thanks to Thiago Veronese

Seam 2 autopacking based on Maven can now use arbitraty settings.xml when specified through mvn.alternate.settings system property.

We look forward to hearing your feedback about this release in the community forums!

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 Seam 2 Extension
Version 1.0.0.Beta1 view tag
Release date 2013-09-18
Released by Aslak Knutsen
Compiled against

Published artifacts org.jboss.arquillian.extension

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

Release notes and resolved issues 14

Enhancement
  • ARQ-759 - Additional dependencies for Seam 2 autopacking should be configurable in arquillian.xml
  • ARQ-760 - Add JBoss AS 7 profile with Seam 2.3
  • ARQ-800 - Should have SeamListener defined in web.xml for test deployment
  • ARQ-1230 - Should observe required object ArquillianDescriptor instead of assuming Lifecycle
Feature Request
  • ARQ-871 - Consider calling Lifecycle.endCall after each test method
  • ARQ-1190 - Identity not supported in Seam2 test enrichment injection
Bug
  • ARQ-776 - Upgrade to JBoss AS 1.0.0.CR3 containers to avoid JAVA_HOME not set issue on Jenkins
  • ARQ-779 - Seam2 Extension does not build on build server
  • ARQ-883 - calling a @Begin method fails with "java.lang.IllegalArgumentException: Stack must not be null"
Task
  • ARQ-761 - Document extension in confluence.
Sub-task
  • ARQ-801 - Should create web.xml if not part of test archive
  • ARQ-802 - Should enhance web.xml if SeamListener not defined
  • ARQ-1465 - Should add empty seam.properties if not present

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