Monday 15th November, 2010
1:30pm to 4:30pm
Members of the Arquillian team unveil the missing link in enterprise Java development: simple, portable integration tests. For many, working in enterprise Java has long been an arduous undertaking because of this void. While development life is simple with unit tests and mocks, they only take you so far. Eventually, you need to validate how your components interact and operate in their intended environment--you real need integration tests. Yet, writing integration tests has meant assuming the burden of bootstrapping all or part of your infrastructure. That's time lost and it places a mental barrier on testing. We'll teach you how to get out of this jam and make the transition from unit to integration tests without any trouble at all.
This lab puts Arquillian in your toolbox. Arquillian is a container-oriented testing framework layered atop TestNG and JUnit that makes testing enterprise Java applications easy. It does so 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.
What’s the secret? This lab gives you an appreciation for how Arquillian simplifies integration testing by providing a component model for tests, just as Java EE 5 simplified server-side programming by providing declarative services for application components. We'll study the test component model, which consists of container lifecycle management, test enrichment (dependency injection), container deployment and in-container test execution. Using a component model means your tests are portable and able to move between different environments, from single embedded or remote to multi-server to multi-cloud nodes.
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 show examples of how the test archive is deployed and executed inside standalone, embedded and remote containers. You'll witness how RPC-style (or local, if applicable) communication between the test runner and the container negotiates which tests are executed and reports back the results.
You'll walk away confident that you can:
1. write integration tests just as you would a unit test and
2. run those tests in multiple environments (containers)
Join this lab to learn how simple and powerful Java enterprise testing can be.
Sign in to add slides, notes or videos to this session