ShrinkWrap Resolver 3.0.0-alpha-1 Released

Since we wrote this post we didn't laze around. Check our latest announcement.

The Arquillian team is proud to announce the 3.0.0-alpha-1 release of the ShrinkWrap Resolver component!

This is the very first release of ShrinkWrap Resolver 3.0.0 release chain. During the next releases we are aiming to provide you a new API for MavenImporter, a possibility to resolve only the build metadata and much more!

This release doesn’t provide any new features, it’s mainly about important component updates and significant refactoring changes:

Removed deprecated code from ShrinkWrap Resolver

This is the only change that significantly influences the implementation logic. ShrinkWrap Resolver has experienced rapid development and many changes on the field of API during last several releases. We decided to deprecate several features which we don’t see important anymore (or we simply found better ways to do it). So we removed all the @Deprecated classes and methods from previous releases.

Maven 3.3.9 & JDK 1.7

We upgraded several components in this release, but the most important one is the upgrade of Maven to 3.3.9. Starting from Maven 3.3 you have to use at least JDK 1.7, which means that ShrinkWrap Resolver 3.0.0 won’t run on any previous version of Java.

Refactoring

Apart from the huge cleanup across all pom.xml files and removal of deprecated classes/methods, project structure has undergone small structure change too. Gradle and Maven modules have been moved to dedicated directories. This technically doesn’t influence the end user by any mean, because both the groupId and the artifactId stayed same.

We hope that you’ll enjoy our new stuff and we are looking forward to your feedback.

What is ShrinkWrap Resolver?

The ShrinkWrap Resolvers project provides a Java API to obtain artifacts from a repository system. This is handy to include third party libraries available in any Maven repository in your test archive. ShrinkWrap Resolvers additionally allow you to reuse all the configuration you've already specified in the Maven build file, making packaging of an application archive much easier job.

Release details

Component ShrinkWrap Resolver
Version 3.0.0-alpha-1 view tag
Release date 2016-09-02
Released by Matous Jobanek
Compiled against
  • JUnit – 4.12

Published artifacts org.jboss.shrinkwrap.resolver

  • org.jboss.shrinkwrap.resolver » shrinkwrap-resolver-bom pom
  • org.jboss.shrinkwrap.resolver » shrinkwrap-resolver-api jar javadoc pom
  • org.jboss.shrinkwrap.resolver » shrinkwrap-resolver-spi jar javadoc pom
  • org.jboss.shrinkwrap.resolver » shrinkwrap-resolver-depchain pom
  • org.jboss.shrinkwrap.resolver » shrinkwrap-resolver-api-maven jar javadoc pom
  • org.jboss.shrinkwrap.resolver » shrinkwrap-resolver-impl-maven jar javadoc pom
  • org.jboss.shrinkwrap.resolver » shrinkwrap-resolver-api-maven-archive jar javadoc pom
  • org.jboss.shrinkwrap.resolver » shrinkwrap-resolver-spi-maven jar javadoc pom
  • org.jboss.shrinkwrap.resolver » shrinkwrap-resolver-spi-maven-archive jar javadoc pom
  • org.jboss.shrinkwrap.resolver » shrinkwrap-resolver-impl-maven-archive jar javadoc pom
  • org.jboss.shrinkwrap.resolver » shrinkwrap-resolver-api-gradle-embedded-archive jar javadoc pom
  • org.jboss.shrinkwrap.resolver » shrinkwrap-resolver-gradle-depchain pom
  • org.jboss.shrinkwrap.resolver » shrinkwrap-resolver-impl-gradle-embedded-archive jar javadoc pom

Release notes and resolved issues 9

Component Upgrade
  • SHRINKRES-244 - Upgrade Maven & Aether dependencies
  • SHRINKRES-248 - Update version of the Jetty server to the latest one (supporting JVM 1.7)
Bug
  • SHRINKRES-252 - Build Failing Locally in AdditionalRemoteRepositoryTestCase
  • SHRINKRES-253 - Maven-plugin build fails with missing version of org.codehaus.plexus:plexus-classworlds
  • SHRINKRES-254 - Wrong parent POM version in impl-maven-integration-tests
Task
  • SHRINKRES-191 - Refactor project structure - gradle and maven separation
  • SHRINKRES-245 - Remove deprecated methods and features
  • SHRINKRES-246 - Introduce Maven BOM to easily manage versions of many dependencies
  • SHRINKRES-247 - Update version of checkstyle plugin

Thanks to the following list of contributors: Matous Jobanek, Andrew Lee Rubinger

ShrinkWrap Resolver 2.2.4 Released

Since we wrote this post we didn't laze around. Check our latest announcement.

The Arquillian team is proud to announce the 2.2.4 release of the ShrinkWrap Resolver component!

Important information

Accidents happen. We are only humans, even though we strive to be like Ike :)

We accidentally pushed a 2.2.3 release which is not backwards-compatible

Please use 2.2.4 and regard 2.2.3 as non-existant.

What is ShrinkWrap Resolver?

The ShrinkWrap Resolvers project provides a Java API to obtain artifacts from a repository system. This is handy to include third party libraries available in any Maven repository in your test archive. ShrinkWrap Resolvers additionally allow you to reuse all the configuration you've already specified in the Maven build file, making packaging of an application archive much easier job.

Release details

Component ShrinkWrap Resolver
Version 2.2.4 view tag
Release date 2016-09-02
Released by Andrew Lee Rubinger
Compiled against
  • JUnit – 4.11

Published artifacts org.jboss.shrinkwrap.resolver

  • org.jboss.shrinkwrap.resolver » shrinkwrap-resolver-bom pom
  • org.jboss.shrinkwrap.resolver » shrinkwrap-resolver-api jar javadoc pom
  • org.jboss.shrinkwrap.resolver » shrinkwrap-resolver-api-gradle-embedded-archive jar javadoc pom
  • org.jboss.shrinkwrap.resolver » shrinkwrap-resolver-api-maven jar javadoc pom
  • org.jboss.shrinkwrap.resolver » shrinkwrap-resolver-depchain pom
  • org.jboss.shrinkwrap.resolver » shrinkwrap-resolver-gradle-depchain pom
  • org.jboss.shrinkwrap.resolver » shrinkwrap-resolver-impl-gradle-embedded-archive jar javadoc pom
  • org.jboss.shrinkwrap.resolver » shrinkwrap-resolver-impl-maven jar javadoc pom
  • org.jboss.shrinkwrap.resolver » shrinkwrap-resolver-api-maven-archive jar javadoc pom
  • org.jboss.shrinkwrap.resolver » shrinkwrap-resolver-spi-maven jar javadoc pom
  • org.jboss.shrinkwrap.resolver » shrinkwrap-resolver-spi-maven-archive jar javadoc pom
  • org.jboss.shrinkwrap.resolver » shrinkwrap-resolver-impl-maven-archive jar javadoc pom
  • org.jboss.shrinkwrap.resolver » shrinkwrap-resolver-spi jar javadoc pom

Release notes and resolved issues 1

Task

Thanks to the following list of contributors: Andrew Lee Rubinger, George Gastaldi

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

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

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 brought several improvements:

  • Updated extension to use latest version of Byteman as well as Arquillian Core.
  • Fixed an issue with Submit command when agent is already running.
  • Improved test suite using Arquillian Chameleon to test it against several different containers (such as different WildFly versions).

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

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.Alpha4 view tag
Release date 2016-09-01
Released by Bartosz Majsak
Compiled against

Published artifacts org.jboss.arquillian.extension

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

Thanks to the following list of contributors: Bartosz Majsak, Dipak Pawar, Tolis Emmanouilidis, Aslak Knutsen, Ales Justin

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 Q Extension 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 Cube Q Extension component!

This is the first release of Arquillian Cube Q. Q is an extension of Arquillian Cube that allows you to write chaos tests. As in Cube, it relies on Docker to execute these kind of tests.

There are several level of chaos that you might introduce in order to verify how your services are behaving when unexpected happens. Starting from network chaos (latency, bandwidth limitation, …​) to operative system chaos (cpu burn, io burn, dill disk, …​). Arquillian Q as all the Arquillian projects, reuses existing chaos frameworks by integrating them into Arquillian universe.

Supported Chaos

Network Chaos

Arquillian Cube Q implements network chaos leveraging Toxiproxy project.

You can use following toxics:

A test with network chaos with Arquillian Cube Q looks like:

@RunWith(Arquillian.class)
public class ToxicFuntionalTestCase {

  @ArquillianResource
  private NetworkChaos networkChaos;

  @HostIp
  private String ip;

  @Test
  public void shouldAddLatency() throws Exception {
    networkChaos.on("pingpong", 8080).latency(latencyInMillis(4000))
      .exec(() -> {

        URL url = new URL("http://" + ip + ":" + 8081 + "/hw/HelloWorld");
        final long l = System.currentTimeMillis();
        String response = IOUtil.asString(url.openStream());
        System.out.println(response);
        System.out.println("Time:" + (System.currentTimeMillis() - l));
        // assertions
    });
  }
}

In this example, the communication with pingpong container on exposed port 8080 is toxified with a latency of 4 seconds.

You can read more about network chaos at https://github.com/arquillian/arquillian-cube-q#network-chaos and an example at https://github.com/arquillian/arquillian-cube-q/tree/master/ftest-toxic

Container Chaos

In order to introduce chaos to the container, Arquillian Q integrates with Pumba project.

It supports following toxics:

  • stopping a container
  • removing a container
  • killing a container process with a signal.

A test with container chaos with Arquillian Cube Q looks as simple as:

@RunWith(Arquillian.class)
public class PumbaFunctionalTestCase {

  @ArquillianResource
  ContainerChaos containerChaos;

  @ArquillianResource
  DockerClient dockerClient;

  @Test
  public void shouldKillContainers() throws Exception {
    containerChaos
            .onCubeDockerHost()
                .killRandomly(
                        ContainerChaos.ContainersType.regularExpression("^pingpong"),
                        ContainerChaos.IntervalType.intervalInSeconds(4),
                        ContainerChaos.KillSignal.SIGTERM
                )
            .exec();

        final List<Container> containers = dockerClient.listContainersCmd().exec();
        // Pumba container is not killed by itself
        assertThat(containers).hasSize(1);

    }

}

In this example, containers called pingpong are killed every 4 seconds.

You can read more about container chaos at https://github.com/arquillian/arquillian-cube-q#container-chaos and an example at https://github.com/arquillian/arquillian-cube-q/tree/master/ftest-pumba

Operative System Chaos

To do operative system chaos Arquillian Q uses some modified version of Netflix Simian Army project scripts.

At this moment we provide:

  • blocking a port
  • burning CPU or IO
  • filling the disk
  • killing the process
  • null route

Here’s the example of the test with operative system chaos using Arquillian Cube Q:

@RunWith(Arquillian.class)
public class SimianArmyFunctionalTestCase {

    @ArquillianResource
    OperativeSystemChaos operativeSystemChaos;

    @HostIp
    String dockerHost;

    @HostPort(containerName = "pingpong ", value = 8080)
    int port;

    @Test(expected = Exception.class)
    public void shouldExecuteBurnCpuChaos() throws Exception {
        operativeSystemChaos.on("pingpong")
            .burnCpu(singleCpu())
            .exec();
        //.....
    }
}

p.This test burns one of the CPU

You can read more about operative system chaos at https://github.com/arquillian/arquillian-cube-q#operative-system-chaos and an example at https://github.com/arquillian/arquillian-cube-q/tree/master/ftest-simianarmy

What’s Next

As it is an Alpha1 release, you might expect some changes in the API as we move towards the final version, although we will try hard to not break anything.

Currently the toxics are explicitly defined in the code, for example you statically define latency of 4 seconds. Next step is creating a random method using which you can randomize the parameters of the toxics. Similarly you would be able to randomize the order of applying toxics.

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 Cube Q Extension
Version 1.0.0.Alpha1 view tag
Release date 2016-08-29
Released by Alex Soto
Compiled against

Published artifacts org.arquillian.cube.q

  • org.arquillian.cube.q » arquillian-cube-q-api jar javadoc pom
  • org.arquillian.cube.q » arquillian-cube-q-spi jar javadoc pom
  • org.arquillian.cube.q » arquillian-cube-q-core jar javadoc pom
  • org.arquillian.cube.q » arquillian-cube-q-toxic jar javadoc pom
  • org.arquillian.cube.q » arquillian-cube-q-pumba jar javadoc pom
  • org.arquillian.cube.q » arquillian-cube-q-simianarmy jar javadoc pom

Thanks to the following list of contributors: Alex Soto, Aslak Knutsen, Stefan Miklosovic