Write real Java integration tests

In this workshop, you'll discover the missing link in enterprise Java development: simple, portable integration tests.

For many, developing with enterprise Java has long been an arduous undertaking because it's been a bear to test. Though development life is simple with unit tests and mocks, they only get you so far. Eventually, you need to validate that your components interact and operate properly in their intended environment--you real need integration tests.

The main obstacle is that your integration tests live in a different world than your application. We'll overcome this discrepency by adopting a component model for your tests, a service provided by Arquillian. This lab puts Arquillian in your toolbox. The goal is to allow you to make a smooth transition from unit to integration tests.

What's the secret? Arquillian, a container-oriented testing framework for TestNG and JUnit, makes testing enterprise Java applications easy by bringing your test to the runtime rather than requiring you to manage the runtime from your test. Picking up where unit tests leave off, Arquillian enables you to test real components that rely on real enterprise services in a real runtime.

We'll begin by introducing you to the fluent API provided by ShrinkWrap that is used to package a test archive, giving you fine-grained control over which resources are available to be tested. We'll work on examples that demonstrate how the test archive is deployed and executed inside standalone, embedded and remote containers. You'll work through tests that exercise a wide range of technologies, including CDI, EJB, JPA, Spring, JAX-RS, JSF, web UI tests and more.

You'll walk away confident that you can:

  1. write integration tests just as you would a unit test,
  2. run those tests in multiple environments (containers) and
  3. have a tool in your toolbox for both testing and discovery

Join this lab to learn how simple and powerful Java enterprise testing can be.


About Dan Allen

Dan Allen

As Principal Software Engineer at JBoss, by Red Hat, Dan serves as the JBoss Community liaison, leads the JBoss Testing Initiative and is a member of the Seam, Weld, Arquillian and ShrinkWrap projects. He authored Seam in Action (Manning), served as a representative for Red Hat on the JSR-314 Expert Group (JSF 2.0), writes for IBM developerWorks and NFJS magazine and is an internationally recognized speaker. He's appeared at major industry conferences including JavaOne, Devoxx, NFJS, JAX and Jazoon and has received recognition as a JavaOne Rock Star, a JBossWorld Top Presenter and a JAX Hall of Fame speaker.

To colleagues, Dan's known for his hard work and passion for Open Source technologies. His technical expertise includes Java frameworks (Seam, CDI, Weld, JSF, EJB 3, JPA, Hibernate, Spring), testing frameworks (Arquillian, JUnit, TestNG, Selenium), build tools (Maven 2, Gradle, Ant) and web development (Ajax, JavaScript, CSS) and more.

You can keep up with Dan's discoveries by reading his blogs at http://mojavelinux.com and http://community.jboss.org/people/dan.j.allen/blog or tracking what he's currently up to by following him on Twitter at http://twitter.com/mojavelinux.

More About Dan »