Rob Williams is a probabilistic Lean coder of Java and Objective-C. Rob is a DZone MVB and is not an employee of DZone and has posted 170 posts at DZone. You can read more from them at their website. View Full User Profile

Setting Up Arquillian to Run in Eclipse

04.21.2011
| 9571 views |
  • submit to reddit

Here is a super quick path to seeing *Arquillian* in action, inside *eclipse*. Do New Project (command-N), pick Maven Project (assuming you have *m2Eclipse* installed). On the 3rd page, the archetype catalog comes up, I have typed in Weld to filter to those archetypes: Note that the selected one is the new release candidate (no longer beta). Pick that. Once the project has been created, you have to add the maven profile to the project settings. First, go into the pom and find the Arquillian profiles. I am going to use the remote one, which means I will leave JBoss running and the runner (*JUnit*) will connect to it and deploy the *shrinkwrap*ped artifact it made. Copy that string to the clipboard. Now, go into the project settings. (You can get in there by typing Command-I.) Highlight the Maven node, you will see the input box on the front page is empty.

Paste the profile name and it will look like this:

Now one last thing to run the tests: start up JBoss. I have 6 installed in the WTP servers window. Note: there is no need to do Add/Remove.

Once it's running, just go to the test and run it like you would any other JUnit test. To see the potential of this workflow in terms of speed, make sure you run the test a few times. The first time it will download a lot of artifacts. The second time, it will be very fast.

 

This whole process should take maybe 10 minutes. 

 

From http://www.jroller.com/robwilliams/entry/setting_up_arquillian_to_run

Published at DZone with permission of Rob Williams, author and DZone MVB.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)

Comments

Shoaib Almas replied on Sat, 2012/08/25 - 5:49am

Glad to see you're enjoying the Enterprise Testing experience with Arquillian! 

I've followed the exact same steps, but instead I get a lot of missing artifacts, such as apache-httpclient:commons-httpclient, which doesn't exist anymore btw.

Java Forum

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.