I have never used any of them, but here is my final documentation:
## Spring Integration Tests ##
Spring allows you to run some integration tests without having to deploy to the application server .
Spring testing support unit <testing> and is provided by the Spring TestContext Framework, which is an agnostic of the testing environment used (JUnit, TestNG, etc.).
TestContext Framework provides:
WebApplicationContext loading of Spring ApplicationContext and WebApplicationContext , as well as caching of these contexts. [1]
Optionally configure instances of your test classes through Dependency Injection. [2]
provides transaction management for transaction tests: the structure will create and roll back a transaction for each test.
provides abstract classes that can be extended by developers to easily encode JUnit or TestNG test classes.
## Arquillian ##
Arkillian runs integration tests inside a real runtime whose life cycle is managed by Arkillian. Indeed, with Arquillian, your integration tests are either performed inside the container , or interact with the container as a client.
The container may be:
- built-in or remote Servlet container (e.g. Tomcat, Jetty),
- Java EE application server (e.g. GlassFish, JBoss AS, Embedded GlassFish),
- Java SE CDI Environment
- or any other container implementation
Arquillan:
controls the container life cycle (start / stop),
Associates a test class with dependent classes and resources in a deployable archive.
enhances the testing class (e.g. allowing @Inject, @EJB and @Resource injections),
Deploys the archive for testing (expand / expand),
captures results and errors.
# How does it work #
Arquillian provides a custom test runner for JUnit and TestNG.
source share