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

New version of Arquillian Cube 1.0.0.Alpha18 has been released!

What’s new

Arquillian Cube BOM

Arquillian Cube BOM has been released so you can unify naming and versions of Arquillian Cube.

<properties>
    <version.arquillian_cube>${latest_released_version}</version.arquillian_cube>
</properties>

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.arquillian.cube</groupId>
            <artifactId>arquillian-cube-bom</artifactId>
            <version>${version.arquillian_cube}</version>
            <scope>import</scope>
            <type>pom</type>
        </dependency>
    </dependencies>
</dependencyManagement>

Then you can include the individual modules such as:

<dependency>
    <groupId>org.arquillian.cube</groupId>
    <artifactId>arquillian-cube-docker</artifactId>
    <scope>test</scope>
    <type>pom</type>
</dependency>

Add AssertJ matcher for current running processes

You can assert on current running processes on given container by doing: assertThat(docker).container("mycontainer").hasProcessRunning("name of process")

Kudos to Ioannis Canellos for internal enhancements on Kubernetes and OpenShift integration.

What is Arquillian Cube Extension?

With Arquillian Cube you can control the lifecycle of Docker images as part of the test lifecyle, either automatically or manually. This gives you the chance to scale up from a integration/functional test level all the way up to the system test level.

Release details

Component Arquillian Cube Extension
Version 1.0.0.Alpha18 view tag
Release date 2017-02-09
Released by Alex Soto
Compiled against

Published artifacts org.arquillian.cube

  • org.arquillian.cube » arquillian-cube-api jar javadoc pom
  • org.arquillian.cube » arquillian-cube-spi jar javadoc pom
  • org.arquillian.cube » arquillian-cube-core jar javadoc pom
  • org.arquillian.cube » arquillian-cube-containerless jar javadoc pom
  • org.arquillian.cube » assertj-docker-java jar javadoc pom
  • org.arquillian.cube » arquillian-cube-docker jar javadoc pom
  • org.arquillian.cube » arquillian-cube-docker-drone jar javadoc pom
  • org.arquillian.cube » arquillian-cube-docker-recorder jar javadoc pom
  • org.arquillian.cube » arquillian-cube-docker-restassured jar javadoc pom
  • org.arquillian.cube » arquillian-cube-openshift jar javadoc pom
  • org.arquillian.cube » arquillian-cube-kubernetes-fabric8 jar javadoc pom
  • org.arquillian.cube » arquillian-cube-kubernetes jar javadoc pom
  • org.arquillian.cube » arquillian-cube-kubernetes-reporter jar javadoc pom
  • org.arquillian.cube » arquillian-cube-requirement jar javadoc pom
  • org.arquillian.cube » arquillian-cube-bom pom

Release notes and resolved issues 4

Enhancement
Bug

Thanks to the following list of contributors: Alex Soto, Dipak Pawar, Ioannis Canellos

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

New version of Arquillian Cube 1.0.0.Alpha17 has been released!

What’s new

Graphene URL auto resolution

In previous versions, Graphene URL auto resolution was based on rather complex algorithm with absolute or relative URLs to detect which was the real URL in Docker space (Old auto resolution). This has been simplified so now only full URLs are permitted.

In this version if URL contains dockerHost, it’s resolved to docker host IP. If it contains an IP then this IP is used. If a string is provided, this is considered as the container name and Arquillian Cube resolves it to the internal container IP.

Support for @CubeIp in Container Objects

Now a Container Object can also be enriched with internal IP of the given container.

Thanks Ramon Rivas for providing this feature!

Provide URL enrichment for standalone mode

New enrichment is provided to construct an URL for black-box tests pointing to a given docker host and resolved exposed port.

@DockerUrl(protocol="http", containerName = "helloworld", exposedPort = "8080", context = "/hello")
@ArquillianResource
URL url;

In the example above URL is the docker host IP pointing to binding port of exposed port 8080 of the container helloworld and using /hello as context.

Set Environment variables for Container Objects

Now you can set environment variables to defined container objects.

@Cube(“tomee”)
@Image("tomee:8-jre-1.7.2-webprofile")
@Environment(key = "A", value = "a")
@Environment(key = "B", value = "b")
public static class ImageContainerObject {
}

Annotation can also be used on the field definition.

Create Volumes for Container Objects

@Cube(“tomee”)
@Image("tomee:8-jre-1.7.2-webprofile")
@Volume(hostPath = "/mypath", containerPath = "/containerPath")
@Volume(hostPath = "/mypath2", containerPath = "/containerPath2")
public static class ImageContainerObject {
}

Annotation can also be used on the field definition.

Add @DockerUrl support for RestAssured enricher

Now you can configure URL for REST-Assured integration using @DockerUrl annotation.

@DockerUrl(containerName = "pingpong", exposedPort = 8080)
@ArquillianResource
RequestSpecBuilder requestSpecBuilder;

RequestSpecBuilder is configured with docker host IP, and resolving port binding from container pingpong and exposed port 8080.

Provide a new URL ResourceProvider for Kubernetes and Openshift

Now you can get URL to connect to a Kubernetes/OpenShift service with ease.

@Named("hello-world-service")
@PortForward
@ArquillianResource
URL url;

In this case the URL is provided pointing directly to the service hello-world so you can easily query it.

Kudos to Ioannis Canellos for providing this feature.

What is Arquillian Cube Extension?

With Arquillian Cube you can control the lifecycle of Docker images as part of the test lifecyle, either automatically or manually. This gives you the chance to scale up from a integration/functional test level all the way up to the system test level.

Release details

Component Arquillian Cube Extension
Version 1.0.0.Alpha17 view tag
Release date 2017-02-01
Released by Alex Soto
Compiled against

Published artifacts org.arquillian.cube

  • org.arquillian.cube » arquillian-cube-api jar javadoc pom
  • org.arquillian.cube » arquillian-cube-spi jar javadoc pom
  • org.arquillian.cube » arquillian-cube-core jar javadoc pom
  • org.arquillian.cube » arquillian-cube-containerless jar javadoc pom
  • org.arquillian.cube » assertj-docker-java jar javadoc pom
  • org.arquillian.cube » arquillian-cube-docker jar javadoc pom
  • org.arquillian.cube » arquillian-cube-docker-drone jar javadoc pom
  • org.arquillian.cube » arquillian-cube-docker-recorder jar javadoc pom
  • org.arquillian.cube » arquillian-cube-docker-restassured jar javadoc pom
  • org.arquillian.cube » arquillian-cube-openshift jar javadoc pom
  • org.arquillian.cube » arquillian-cube-kubernetes-fabric8 jar javadoc pom
  • org.arquillian.cube » arquillian-cube-kubernetes jar javadoc pom
  • org.arquillian.cube » arquillian-cube-kubernetes-reporter jar javadoc pom
  • org.arquillian.cube » arquillian-cube-requirement jar javadoc pom

Release notes and resolved issues 8

Enhancement
Bug
Other

Thanks to the following list of contributors: Alex Soto, Dipak Pawar, Ramon Rivas, Ioannis Canellos

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

New version of Arquillian Cube 1.0.0.Alpha16 has been released with quite a bunch of enhancements and bugfixes.

What’s new

RestAssured configuration done via RequestSpecBuilder

In the previous version of Arquillian Cube, all parameters were set using internal RestAssured static method. This approach made test methods unable to be ran in parallel.
To address this issue we provide injection of RequestSpecBuilder class which lets you specify parameters such as host, port or HTTP headers on a test basis.

@ArquillianResource
RequestSpecBuilder requestSpecBuilder;

@Test
public void should_receive_ok_message() {
      RestAssured
          .given()
            .spec(requestSpecBuilder.build())
          .when()
            .get()
          .then()
            .assertThat().body("status", equalTo("OK"));
}

Arquillian Recorder/Reporter integration with Kubernetes

We have enhanced integration of Arquillian Recorder/Reporter in Cube by providing Kubernetes module. By using it you can easily get access to all configuration parameters used for test execution, as well as the session status which include Pods, Services, Replication Controllers, Namespaces, …

Kubernetes namespace prefix are fully configurable

namespace.prefix configuration parameter has been added to configure the namespace prefix.

Creates an AssertJ custom assertions for Docker

Now you can use AssertJ custom assertions for validating Docker containers.

@ArquillianResource
DockerClient docker;
assertThat(docker).hasImage("myimage");
assertThat(docker).container("myinstancename").hasExposedPorts(8080);
assertThat(docker).container("myinstancename").hasBindPorts(8080)

Creates stop/kill attribute

It may happen that certain docker image takes a lot of time to shutdown. For example shutting down selenium server in standalone debug mode might take ~10 seconds on the modern machine. These images are not really relavant for your test logic, they simply provide browsers to exercise our app against.

At the end of the tests, you spend 10 seconds waiting that this instance is stopped without a real need. We can simply kill such an image and save time during the build.

For this purpose boolean attribute killContainer in CUBE format has been added to set that an image should be killed. By default it is false which means that container is stopped normally.

Support for IP address management

Add support for adding IPAM options in network section in docker-compose files.

Add cleanBuildImage attribute

Configuration boolean cleanBuildImage parameter has been added so you can choose if all build images should be removed from docker host or not after finishing the build. By default build images are removed.

Reporting improvements

Arquillian Recorder Reporter now also displays information about containers like IO, Network or disk usage.

Port forwarding

Make possible to configure the port forwarder server bind address. This way you can run more than one instance of the port forwarder on the same machine.

UI videos in MP4 format

In the previous version of Cube, videos recorded during UI tests were stored in flv format. As Flash is slowly disappearing we decided to switch to format supported by HTML5 <video> tag.

What is Arquillian Cube Extension?

With Arquillian Cube you can control the lifecycle of Docker images as part of the test lifecyle, either automatically or manually. This gives you the chance to scale up from a integration/functional test level all the way up to the system test level.

Release details

Component Arquillian Cube Extension
Version 1.0.0.Alpha16 view tag
Release date 2017-01-10
Released by Alex Soto
Compiled against

Published artifacts org.arquillian.cube

  • org.arquillian.cube » arquillian-cube-api jar javadoc pom
  • org.arquillian.cube » arquillian-cube-spi jar javadoc pom
  • org.arquillian.cube » arquillian-cube-core jar javadoc pom
  • org.arquillian.cube » arquillian-cube-containerless jar javadoc pom
  • org.arquillian.cube » assertj-docker-java jar javadoc pom
  • org.arquillian.cube » arquillian-cube-docker jar javadoc pom
  • org.arquillian.cube » arquillian-cube-docker-drone jar javadoc pom
  • org.arquillian.cube » arquillian-cube-docker-recorder jar javadoc pom
  • org.arquillian.cube » arquillian-cube-docker-restassured jar javadoc pom
  • org.arquillian.cube » arquillian-cube-openshift jar javadoc pom
  • org.arquillian.cube » arquillian-cube-kubernetes-fabric8 jar javadoc pom
  • org.arquillian.cube » arquillian-cube-kubernetes jar javadoc pom
  • org.arquillian.cube » arquillian-cube-kubernetes-reporter jar javadoc pom
  • org.arquillian.cube » arquillian-cube-requirement jar javadoc pom

Release notes and resolved issues 30

Enhancement
Bug
Other
Docker

Thanks to the following list of contributors: Dipak Pawar, Bartosz Majsak, Hemani, Alex Soto, Ioannis Canellos, Jonh Wendell, Filippe, Eddú Meléndez Gonzales, Rob Cernich

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

Apart from bug fixes in the openshift module, we brought very anticipated new feature – support for Kubernetes. This was a joint effort with the amazing fabric-8 team.

New Features

Kubernetes Support

The kubernetes extension helps you write and run integration tests for your Kubernetes/Openshift application.

This extension will run tests in a black-box fashion, creating and managing a temporary namespace for your tests, apply all Kubernetes resources required to create your environment and once everything is ready it will run your tests. The tests will be enriched with resources required to access services. Finally when testing is over it will cleanup everything.

The test cases are meant to interact with the provided services and assert that the environment is in the expected state.

@RunWith(Arquillian.class)
public class HelloWorldTest {

    @Named("hello-world-service")
    @ArquillianResource
    Service helloWorld;

    @Test
    public void shouldShowHelloWorld() throws IOException {
        assertNotNull(helloWorld);
        assertNotNull(helloWorld.getSpec());
        assertNotNull(helloWorld.getSpec().getPorts());
        assertFalse(helloWorld.getSpec().getPorts().isEmpty());
    }
}

In this example, test reads for kubernetes.json file form the root of the classpath, deploys everything and injects Kubernetes components into the test. Notice that you can assert that elements are correctly configured as well as getting information for connecting to the services and validate they have been deployed correctly.

You can also import io.fabric8:kubernetes-assertions, which is built on top of excellent assertj project, you’ll be able to write assertions like:

@RunWith(Arquillian.class)
public class ExampleTest {

  @ArquillianResource
  KubernetesClient client;

  @ArquillianResource
  Session session;

  @Test
  public void testAtLeastOnePod() throws Exception {
    assertThat(client).pods()
                      .runningStatus()
                      .filterNamespace(session.getNamespace())
                      .hasSize(1);
  }
}

You can read more about Kubernetes integration at http://arquillian.org/arquillian-cube/#_kubernetes and full example at https://github.com/arquillian/arquillian-cube/tree/master/kubernetes/ftest-kubernetes

Fabric8 Support

The Fabric8 extension can be used along with the Kubernetes extension to provide a tighter integration with the Fabric8 Microservices Platform.

It provides Fabric8Label provider and Fabric8Annotation provider.

You can read more about Fabric 8 integration at http://arquillian.org/arquillian-cube/#_fabric8

What is Arquillian Cube Extension?

With Arquillian Cube you can control the lifecycle of Docker images as part of the test lifecyle, either automatically or manually. This gives you the chance to scale up from a integration/functional test level all the way up to the system test level.

Release details

Component Arquillian Cube Extension
Version 1.0.0.Alpha15 view tag
Release date 2016-09-01
Released by Alex Soto
Compiled against

Published artifacts org.arquillian.cube

  • org.arquillian.cube » arquillian-cube-api jar javadoc pom
  • org.arquillian.cube » arquillian-cube-spi jar javadoc pom
  • org.arquillian.cube » arquillian-cube-core jar javadoc pom
  • org.arquillian.cube » arquillian-cube-containerless jar javadoc pom
  • org.arquillian.cube » arquillian-cube-docker jar javadoc pom
  • org.arquillian.cube » arquillian-cube-docker-drone jar javadoc pom
  • org.arquillian.cube » arquillian-cube-docker-recorder jar javadoc pom
  • org.arquillian.cube » arquillian-cube-docker-restassured jar javadoc pom
  • org.arquillian.cube » arquillian-cube-openshift jar javadoc pom
  • org.arquillian.cube » arquillian-cube-kubernetes-fabric8 jar javadoc pom
  • org.arquillian.cube » arquillian-cube-kubernetes jar javadoc pom
  • org.arquillian.cube » arquillian-cube-requirement jar javadoc pom

Release notes and resolved issues 1

Enhancement

Thanks to the following list of contributors: Ales Justin, Alex Soto, Jonh Wendell, Ioannis Canellos

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

What is Arquillian Cube Extension?

With Arquillian Cube you can control the lifecycle of Docker images as part of the test lifecyle, either automatically or manually. This gives you the chance to scale up from a integration/functional test level all the way up to the system test level.

Release details

Component Arquillian Cube Extension
Version 1.0.0.Alpha14 view tag
Release date 2016-08-18
Released by Alex Soto
Compiled against

Published artifacts org.arquillian.cube

  • org.arquillian.cube » arquillian-cube-api jar javadoc pom
  • org.arquillian.cube » arquillian-cube-spi jar javadoc pom
  • org.arquillian.cube » arquillian-cube-core jar javadoc pom
  • org.arquillian.cube » arquillian-cube-containerless jar javadoc pom
  • org.arquillian.cube » arquillian-cube-docker jar javadoc pom
  • org.arquillian.cube » arquillian-cube-docker-drone jar javadoc pom
  • org.arquillian.cube » arquillian-cube-docker-recorder jar javadoc pom
  • org.arquillian.cube » arquillian-cube-docker-restassured jar javadoc pom
  • org.arquillian.cube » arquillian-cube-openshift jar javadoc pom
  • org.arquillian.cube » arquillian-cube-kubernetes-fabric8 jar javadoc pom
  • org.arquillian.cube » arquillian-cube-kubernetes jar javadoc pom
  • org.arquillian.cube » arquillian-cube-requirement jar javadoc pom

Release notes and resolved issues 2

Bug
Other

Thanks to the following list of contributors: Alex Soto