Tuesday, October 25, 2016

Run Arquillian test on JBoss EAP 7/ Wildfly 10 using Arquillian Chameleon Container

Arqullian

http://arquillian.org/guides/getting_started/

Arquillian Chameleon Container

 https://github.com/arquillian/arquillian-container-chameleon

 http://discuss.arquillian.org/t/proxy-container-for-all-jboss-as-jboss-eap-wildfly/124/7

 Add Maven dependency ( check for latest version )

<dependency>
    <groupId>org.arquillian.container</groupId>
    <artifactId>arquillian-container-chameleon</artifactId>
    <version>1.0.0.Alpha7</version>
</dependency>

Add container configuration into arquillian.xml file

<arquillian xmlns="http://jboss.org/schema/arquillian"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:schemaLocation="http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd">
    
     <container qualifier="chameleon" default="true">
        <configuration>
            <property name="chameleonTarget">jboss eap:7.0.1:remote</property>
            <property name="managementAddress">localhost</property>
            <property name="managementPort">9990</property>
            <property name="username">${jboss.admin.user}</property>
            <property name="password">${jboss.admin.password}!</property>
        </configuration>
    </container>
   
</arquillian>


Add Maven dependencies in multi-module project using shrinkwrap-resolver-impl-maven http://stackoverflow.com/questions/13001371/adding-all-maven-dependencies-to-arquillian

https://github.com/shrinkwrap/resolver


Add Chameleon container dependency ( using runTests profile )

<profile>
            <id>runTests</id>
            <activation>
                <property>
                    <name>runTests</name>
                    <value>true</value>
                </property>
            </activation>
            <dependencies>
                <dependency>
                     <groupId>org.arquillian.container</groupId>
                     <artifactId>arquillian-container-chameleon</artifactId>
                 </dependency>
            </dependencies>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <configuration>
                            <skipTests>false</skipTests>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

Run the single test using Maven command line

$ mvn clean install -PrunTests  -Dtest=ArqTestCase

2 comments:

  1. I really appreciate information shared above. It’s of great help. If someone want to learn Online (Virtual) instructor lead live training in Alfresco , kindly contact us http://www.maxmunus.com/contact
    MaxMunus Offer World Class Virtual Instructor led training on Alfresco. We have industry expert trainer. We provide Training Material and Software Support. MaxMunus has successfully conducted 100000+ trainings in India, USA, UK, Australlia, Switzerland, Qatar, Saudi Arabia, Bangladesh, Bahrain and UAE etc.
    For Demo Contact us:
    Name : Arunkumar U
    Email : arun@maxmunus.com
    Skype id: training_maxmunus
    Contact No.-+91-9738507310
    Company Website –http://www.maxmunus.com


    ReplyDelete
  2. I have just read your site Your blog is so interesting, We are also giving oracle fusion Course Online Training.The oracle Online Training is one of the leading Online Training institute,thanks for sharing.
    Oracle fusion financials training

    ReplyDelete