How To Setup Arquillian Testing Alongside Wildfly

This tutorial requires:

  • Knowledge amongst GIT
  • Knowledge amongst archetype
Requirements:
  • Wildfly
  • eclipse
What to do:
  1. In eclipse practise a novel maven project: File->New->Other, come inwards maven inwards the filter. Select Maven Project.
  2. Click next, thus next. In the filter come inwards "javaee". Select wildfly-javaee7-webapp-archetype.
  3. Click next, come inwards grouping in addition to artifact id.
  4. Click finish. Your projection should locomote created.
  5. Open arquillian.xml inwards src/test/resources. Uncomment configuration department in addition to develop the jbossHome property:
    <?xml version="1.0" encoding="UTF-8"?> <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">   <!-- Force the purpose of the Servlet 3.0 protocol amongst all containers, equally it    is the close mature -->  <defaultProtocol type="Servlet 3.0" />   <!-- Example configuration for a remote WildFly event -->  <container qualifier="wildfly" default="true">   <!-- By default, arquillian volition purpose the JBOSS_HOME surroundings variable.     Alternatively, the configuration below tin locomote uncommented. -->   <configuration>    <property name="jbossHome">C:\java\jboss\wildfly-10.1.0.Final</property> <!--    <property name="javaVmArguments">-Xmx512m -XX:MaxPermSize=128m --> <!--                 -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y --> <!--             </property> -->   </configuration>  </container>   <engine>   <property name="deploymentExportPath">target/deployments</property>  </engine>  </arquillian> 
  6. Then inwards your terminal, teach to your projection directory in addition to run:
    >mvn build clean exam -Parq-wildfly-managed
    >This piece of job arquillian exam using wildfly managed container.
It's genuinely a straightforward process. The tricky business office is creating your exam war. Open MemberRegistrationTest, to come across what I mean. Sometimes it's useful to include an archive amongst all its dependencies than including i course of report at a time.
Next
Previous
Click here for Comments

0 komentar:

Please comment if there are any that need to be asked.