Pros:
-
universal
-
any scenario can be covered with same approach
-
standard test harness
-
arquillian is de-facto industry standard
-
better coverage
-
more platforms can be covered by one set of tests tests running against different databases
-
testing with various WF/EAP versions for free
-
real testing
-
tests ran by continuous integration reveal more real issues than classic unit tests
Cons:
In order to execute tests faster, there are several strategies that can be employed:
-
smoke testing
-
pick some subset of tests that will be run during regular build - mvn clean install
-
the full test suite can be ran as part of continuous integration OR on weekly basis
-
leveraging JUnit categories - e.g. @Smoke
-
mocked containers
-
bootstrapping just features that are necessary (e.g. weld container)
-
suite-level deployment
-
deploy once per maven module
-
developing against remote container
-
minimal deployment-related overhead while testing against real container
For some use cases Arquillian might be the only solution, where architecting own test harness would mean reinventing application server itself:
|