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 excellentassertj
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 andFabric8Annotation
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