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)

Introduction to Arquillian extensions


Besides the core injection capabilities of Arquillian, a number of extensions exist that can provide additional injection points within your test cases.

Framework extensions

Several extensions exist to support injection of more proprietary injection technologies. This focuses around Spring, since it is a popular framework and will be used when Warp is reviewed in Chapter 7, Functional Application Testing.

Spring

In order to demonstrate Spring integration, a separate project exists; take a look at the arquillian-chapter5-spring project to see the example code. The Arquillian Spring Extension supports annotation-driven and programmatic bootstrapping of Spring as well as classic XML-based configuration. This gives you better diversity when building your archive. For the sake of these examples, the container in use is Tomcat 6 managed, and you should have CATALINA_HOME set prior to running the examples. This allows us to separate the classpath entries from the...