Arquillian / Arquillian tutorials
The three requirements for creating an Arquillian test.
- @RunWith(Arquillian.class) annotation required on the Test class.
- A public static method annotated with @Deployment that returns a ShrinkWrap archive.
- At least one method annotated with @Test.
@RunWith instructs JUnit or other test providers to use Arquillian as the test controller.
public static method annotated with the @Deployment annotation faciliates Arquillian to retrieve the test archive.
Each @Test method runs inside the container environment.
Please note that @Deployment method is optional and it is required only for the tests that runs inside the container.Client-side tests doesn't require a test archive so @Deployment method is optional.
More Related questions...