Book Image

Arquillian Testing Guide

By : John D. Ament
Book Image

Arquillian Testing Guide

By: John D. Ament

Overview of this book

<p>Integration testing sometimes involves writing complex codes. This book introduces you to the capabilities of Arquillian to enable you to write simple code with a broad range of integration tests for java applications. <br /><br />Arquillian Testing Guide serves as an introductory book to writing simple codes for testing java applications. This book will help you to develop richer test cases which can be run automatically while performing rigorous testing of the software. <br /><br />Arquillian Testing Guide introduces you to Arquillians features and capabilities. This book will help you understand the mechanism of creating deployments and test against those deployments. The book begins with basic JUnit test cases beginning with an enterprise test case, which then go on to discuss remote testing. During the course of the book, you will also learn how to mix container and non-container tests into a single test case. By the end of the book, you will have learned how to extend JUnit tests to work with Arquillian and deploy them to a container automatically.</p>
Table of Contents (17 chapters)

Multiple artifacts


So far, we've reviewed creating simple artifacts. Most deployments have either been a WAR file or a JAR file. Arquillian does support RAR and EAR deployment; it's just that in Java EE 6 the need for having EARs has been greatly reduced–you can now deploy your EJBs into your WAR module, so it's unnecessary to have an external EJB-JAR.

There are some modular approaches to the application development and deployment that may require you to build out many deployable archives. OSGi is one standard that helps with it, but other tools exist such as JBoss modules that support similar packaging structures.

Creating EARs

Your application may choose to deploy as an EAR file. This would be based on the library usage as well as the decided deployment structure. In Java EE 6, you get all of the capabilities of an EAR deployment with EJB JARs packaged in the WAR, as well as being able to package EJBs directly in your WAR file.

The enterprise archives with Arquillian can be a little tricky...