Version 2

    This is a simple example showing how Arquillian can be used with tomcat, using CDI with Weld. Both embedded and remote tests are provided, and can be run with Maven or Gradle.



    mvn -Ptc6-remote clean test
    mvn -Ptc6-embedded clean test



    gradle clean tc6R
    gradle clean tc6E



    In order to configure remote testing, JMX needs to be enabled and user access configured for the manager application.


    1. JMX


    The following options added to tomcat startup parameters enable JMX on port 8099:


    2. User Access

    Tthe "manager" application needs to be deployed, as well as users configured, e.g. in TOMCAT_HOME/conf/tomcat-users.xml:

            <role rolename="manager" />
            <user username="admin" password="pass" roles="manager" />



    This will allow deployment of remote tests from arquillian, using the following configuration (arquillian.xml):


    <property name="jmxPort">8099</property>
    <property name="user">admin</property>
    <property name="pass">pass</property>