Geertjan's Blog

  • July 17, 2015

Getting Started with Arquillian in NetBeans IDE

Geertjan Wielenga
Product Manager

Arquillian is JUnit for Java EE applications. (Plus more.) Read all about its features here. Markus Eisele wrote an article about the usage of Arquillian with NetBeans, sometime ago, here:


I took a look at Arquillian today, via a new Maven project that Aslak Knutsen from Arquillian has made available here:


Simply git the above and then go to File | Open Project in NetBeans and point to the folder that contains the POM. Because NetBeans is smart and able to recognize and parse the POM, it will open the Maven project and visualize its structure automatically, no import process of any kind is needed. Play around with the test class in the Maven project, i.e, add some new tests to it for the simple CDI sample or change the existing test, and then right-click the project and choose Test (Alt-F6). You'll see the integration of Arquillian with NetBeans IDE, i.e., the tests are run and the results are shown, as you can see here (click to enlarge the image):

Next, you can integrate with JaCoCo, to see your code coverage, as described here.

On Windows, I encountered the problem described here, which I resolved as described there, i.e., I set 'jbossHome' in the 'arquillian.xml' file. Then the first time the tests are run, there's a failure because WildFly cannot be found because it hasn't been downloaded yet. Next time you run the tests, the server is downloaded, thanks to Chameleon, and the 'jbossHome' property points to the correct location, i.e., in the 'target' folder and is then able to run the tests.

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.