JBoss Community Archive (Read Only)

Arquillian Old

Protocol selection

A protocol is how Arquillian talks and executes the tests inside the container. For ease of development and configuration a container defines a default protocol that will be used if no other is specified. You can override this default behavior by defining the @OverProtocol annotation on your @Deployment method.

@Deployment @OverProtocol("MyCustomProtocol")
public static WebArchive createDep1() {}

public void testExecutedUsingCustomProtocol() {}

When testExecutedUsingCustomProtocol is executed, instead of using the containers default defined protocol, Arquillian will use MyCustomProtocol to communicate with the container. Since this is defined on Deployment level, you can have different test methods operate on different deployments and there for be executed using different protocols. This can be useful when for instance a protocols packaging requirements hinder how you define your archive, or you simply can't communicate with the container using the default protocol due to e.g. fire wall settings.

Arquillian only support Servlet 2.5 and Servlet 3.0 at this time. EJB 3.0 and 3.1 are in the plans. But your might implement your own Protocol. See the Complete Protocol Reference for what is currently supported.

JBoss.org Content Archive (Read Only), exported from JBoss Community Documentation Editor at 2020-03-10 12:19:01 UTC, last content change 2011-04-16 15:42:18 UTC.