Getting started with Arquillian
Although Arquillian does not depend on a specific build tool, it is commonly used with Maven; it offers dependency management and thus simplifies the task of including the Arquillian libraries in the application since they are distributed in the Central Maven repository.
Depending on the type of archetype you used for generation, you might have a different folder structure in your project; this is not an issue. What is really important is that you provide the following structure under your src
folder:
main/java/
: Place all application Java source files here (under the Java package)main/resources/
: Place all application configuration files heretest/java/
: Place all test Java source files here (under the Java package)test/resources/
: Place all test configuration files here (for example,persistence.xml
)
So by now, we will be working under test/java
, which is where we will place our first Arquillian test class.
Writing an Arquillian test
If you have been working...