Arquillian Testing Guide

Arquillian Testing Guide
eBook: $23.99
Formats: PDF, PacktLib, ePub and Mobi formats
save 15%!
Print + free eBook + free PacktLib access to the book: $63.98    Print cover: $39.99
save 37%!
Free Shipping!
UK, US, Europe and selected countries in Asia.
Also available on:
Table of Contents
Sample Chapters
  • Build effective unit tests and integration using Arquillian and JUnit
  • Leverage Arquillian to test all aspects of your application – UI, SOAP and REST based applications
  • Run your tests the easy way using Arquillian in a container

Book Details

Language : English
Paperback : 242 pages [ 235mm x 191mm ]
Release Date : April 2013
ISBN : 1782160701
ISBN 13 : 9781782160700
Author(s) : John D. Ament
Topics and Technologies : All Books, Application Development, Open Source

Table of Contents

Chapter 1: The Aliens Have Landed!
Chapter 2: The Evolution of Testing
Chapter 3: Container Testing
Chapter 4: Why Did the Test Fail?
Chapter 5: Enriching the Enterprise Test Case
Chapter 6: Arquillian Extensions
Chapter 7: Functional Application Testing
Chapter 8: Service Testing
Chapter 9: Arquillian and OSGi
Chapter 10: ShrinkWrap in Action
  • Chapter 1: The Aliens Have Landed!
    • The progression of testing
    • What is Arquillian
      • The Arquillian difference
      • The fundamentals of a test case
      • Testing profiles
      • Categorizing your test cases
      • Enriching your tests
      • Running out of the container
      • Efficient test authoring
      • ShrinkWrap – building your own app
      • Getting the most from Arquillian
      • Arquillian extensions
    • Summary
    • Chapter 2: The Evolution of Testing
      • How did we get here?
        • J2EE, in the beginning
        • Manual testing patterns
        • XDoclet – the component revolution
      • A jump in technology
        • Mocking
          • Still missing something
        • OpenEJB, the embedded EJB container
        • Servlet containers
        • Spring TestContext
        • Selenium – functional testing
        • QuickTest Professional
        • soapUI
        • Deployment
      • Summary
      • Chapter 3: Container Testing
        • Containers and deployments
          • Deployments
          • Protocols
          • The embedded container
            • Running the containers
            • Weld SE and EE
            • OpenWebBeans
            • OpenEJB
            • Jetty
            • Apache Tomcat
            • Mix and match patterns
            • Apache TomEE
            • GlassFish 3.1
            • JBoss AS 6.x
            • Honorable mentions
            • Embedded container summary
          • Managed containers
            • JBoss containers
            • GlassFish 3.1
            • Tomcat
            • Managed container summary
          • Remote containers
            • Tomcat
            • JBoss
            • GlassFish
            • WebLogic
            • Apache TomEE
            • Cloud deployments
          • Remote testing strategy
            • Remote testing use cases
            • Structuring the remote test case
            • Other remote cases
          • Remote testing tools
            • Deploying to multiple containers
            • The power of remote testing
          • Remote container summary
          • Container comparison
            • Tomcat
            • Apache TomEE
            • JBoss
            • GlassFish
            • Cloud containers
            • WebLogic
            • Other setups – the embedded applications
            • Unofficial containers
        • Summary
        • Chapter 4: Why Did the Test Fail?
          • Running your tests – the downside
            • The frustration
            • Packaging structure
              • The wrong type of archive
              • The container-specific descriptor
              • Wrong package version
            • The hard hat area
              • Sharing resources
              • Hello, are you listening?
              • Watch out for falling bugs
            • Problems starting up
              • The ports are working against you
              • You need a container
              • Consulting the remote server
            • Managing your test runtimes
              • Make it compile
              • Set up your profiles for long term
              • Overlapping profiles
            • The dos and don'ts
              • Embedded container dos and don'ts
              • Managed containers dos and don'ts
              • Remote container dos and don'ts
          • Summary
          • Chapter 5: Enriching the Enterprise Test Case
            • Testing the dependency injection
              • CDI injection – simplicity in action
                • Testing external extensions
                • Building and testing extensions
              • EJB and resource injection
                • Special considerations for EJB deployments
                • Testing persistence
                • Testing Session beans
                • Working with Remote Session Beans
            • Failure scenarios
              • Dependency failures
            • Introduction to Arquillian extensions
              • Framework extensions
              • Spring
                • Arquillian versus Spring test
            • Summary
            • Chapter 6: Arquillian Extensions
              • Extending Arquillian
              • Testing against a database using JPA
                • The Persistence Extension
                  • Preloading the database
                  • Validate and clean up your database
                • Mix and match
              • The transaction extension
              • Multiple artifacts
                • Creating EARs
                  • JaCoCo and Arquillian – code coverage
                • Deploying dependencies
              • Spock, very groovy test writing
              • Summary
              • Chapter 7: Functional Application Testing
                • Functional testing
                  • Functional testing using Selenium
                    • Consider the approach
                    • Test Driven Development
                  • Simplifying the test case
                    • Page delegate pattern
                  • Warp drive
                    • Phases
                    • Grouping requests
                    • Spring MVC and Warp
                  • Rich application testing with Graphene
                    • Captures
                    • Selectors and interactions
                • Summary
                • Chapter 8: Service Testing
                  • Service testing approaches
                    • Web service stubs
                    • Application invocation
                    • Compare and contrast
                    • Using soapUI
                      • soapUI and Arquillian
                      • soapUI and REST APIs
                    • Other REST tests
                      • HTTP client testing
                    • Testing JMS
                    • Testing Seam 2
                  • Summary
                  • Chapter 9: Arquillian and OSGi
                    • OSGi and Arquillian
                      • What is OSGi?
                      • JBoss OSGi
                      • OSGi versus everything else
                        • OSGi versus JBoss Modules
                      • Working with OSGi in a test case
                        • ShrinkWrap Assets
                        • OSGi archives
                        • Testing a deployed service
                      • Life outside of OSGi embedded
                        • Testing Java EE using OSGi
                        • Multiple deployment scenarios
                      • OSGi support in GlassFish
                    • Summary
                    • Chapter 10: ShrinkWrap in Action
                      • What is ShrinkWrap?
                        • Creating archives
                        • Adding resources
                          • Assets
                      • Managing libraries and modules
                        • More on building EARs
                        • ShrinkWrap resolver
                        • Importing modules
                        • Deployment descriptors
                          • Importing descriptors
                          • Deploying descriptors
                        • A complex use case
                      • Summary

                      John D. Ament

                      John D. Ament was born to a beautician and a taxi driver in the warm summer of 1983 in Ridgewood, New York. At the age of six his family moved to the northern suburbs of New Jersey. After graduating from the Rutgers University and working a few short-term IT jobs, he moved to the southern side of New Jersey just outside of Philadelphia, where he has been located for the last seven years.

                      In 2008, he started participating in the open source community. After working with Spring a bit here and there, he started investigating the Seam framework. After finding use of the framework in a few applications, he started participating more and more with the community.

                      Eventually, he became the module lead for a couple of components in Seam 3 and started working more and more with open source technologies. This led to more and more community involvement, including participation in the JMS 2.0 Expert Group.

                      After following through on some test-driven trends, he decided to try out a new framework called Arquillian to help automate some of the testing being performed on a few work-related projects. It surprisingly worked well, to the point of being used to perform all of the automated testing against container deployments of applications he was working on. This drove a lot of passion for the framework and his continued use of the tool today.

                      Sorry, we don't have any reviews for this title yet.

                      Code Downloads

                      Download the code and support files for this book.

                      Submit Errata

                      Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.


                      - 1 submitted: last submission 25 Nov 2013

                      Errata type: Typo

                      Page No. 19, in the first line after the code snippet
                      mvn test - integrationtest
                      It should be
                      mvn test - P integrationtest

                      Sample chapters

                      You can view our sample chapters and prefaces of this title on PacktLib or download sample chapters in PDF format.

                      Frequently bought together

                      Arquillian Testing Guide +    Oracle SOA BPEL Process Manager 11gR1 – A Hands-on Tutorial =
                      50% Off
                      the second eBook
                      Price for both: €31.60

                      Buy both these recommended eBooks together and get 50% off the cheapest eBook.

                      What you will learn from this book

                      • Develop automated tests using Arquillian and JUnit
                      • Create tests using Selenium and then execute them paired with Arquillian Drone
                      • Test using Arquillian Graphene to manipulate the DOM of your web applications
                      • Learn how to use Arquillian and Spring to automatically wire an application context
                      • Learn how to deploy your web services and test them automatically using Arquillian and soapUI

                      In Detail

                      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.

                      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.

                      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.


                      This book is a tutorial filled with plenty of code examples and strategies to give you many options when building your test structure.

                      Who this book is for

                      This book is for developers and testers alike. Anyone who has worked with test driven development or building automated test cases will find use in this book. A reader should be familiar with some automation strategies and techniques such as JUnit and should have some exposure to techniques such as mocking.

                      Code Download and Errata
                      Packt Anytime, Anywhere
                      Register Books
                      Print Upgrades
                      eBook Downloads
                      Video Support
                      Contact Us
                      Awards Voting Nominations Previous Winners
                      Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
                      Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software