Testing Swarm microservices with Arquillian

In this section, you will learn how Arquillian can be used to test microservices created with Swarm. As you learned in previous chapters, Swarm builds a runtime containing only fractions needed by a given service, starts it, and then deploys an archive on it, creating the microservice.

Arquillian, as we have just learned, tests an application on its dedicated runtime. It starts the runtime, deploys the tested code on it, and performs the test. Let's configure such a test for our JAX-RS and the CDI catalog service example, and explain what we are doing step by step. 

For examples: refer to chapter 5/catalog-service-simple-test.

First of all, we have to provide all the necessary dependencies:

(...) ...

Get Hands-On Cloud Development with WildFly now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.