Arquillian tests on a WildFly instance hosted on OpenShift (Tech Tip #55)

Tech Tip #54 explained how to enable Arquillian for an existing Java EE project. In that tip, the tests were run against a locally installed WildFly server. Would the same adapter work if this WildFly instance was running on OpenShift ? No!

Because the security constraints and requirement of a PaaS, as opposed to a localhost, are different. Lets take a look at what’s required to run our tests in javaee7-continuous-delivery on a WildFly instance hosted on OpenShift.

Lets get started!

  1. As explained in Tech Tip #52, create a WildFly application on OpenShift as shown:
    Note down the ssh user name from the log. This is the part before @ in the value corresponding to SSH to.
  2. Until FORGEPLUGINS-177 is resolved, we need to manually add maven profile and provide container configuration information in “arquillian.xml”. Add the following <profile> to “pom.xml”:
    This is using arquillian-openshift container and referring to arquillian-wildfly-openshift configuration that will be matched with the appropriate container in “arquillian.xml”.

    So this is how the updated “arquillian.xml” look:

    Note the new <container> with the qualifier arquillian-wildfly-openshift. It provides information about where the server is located and some other configuration properties. The sshUserName property value should be the same from the WildFly instance created earlier.

  3. That’s it, now you can run the test against the WildFly instance on OpenShift:

The complete source code is available at github.com/arun-gupta/javaee7-continuous-delivery.

Enjoy!

Be Sociable, Share!
  • Tweet

4 thoughts on “Arquillian tests on a WildFly instance hosted on OpenShift (Tech Tip #55)

  1. Pingback: Develop In Java Newsletter #11 – a Weekly Java Newsletter | Develop In Java
  2. After a long search I have found out one of the prime text file which will help you to map drive windows 7 as this feature of windows is an prime feature so if you are facing somehow any problem so you may have help of this portal.

  3. I found your website perfect for my needs. It contains wonderful and helpful posts. Keep up the good work! run 3 cool math

Leave a Reply

Your email address will not be published. Required fields are marked *