I will assume you are using maven...
1) You could try to use the arquillian maven plugin: https://github.com/arquillian/arquillian-maven
It's still in alpha but should be able to do what you are asking for.
2) Move the intergation test in a different project and run them after the artifact you want to test it's been installed. This way you can use Maven resolver to obtain the artifact you want to test plus all the transitive dependencies.
This approch is used in this project: https://github.com/hibernate/hibernate-search/blob/master/hibernate-search-integrationtest/src/test/java/org/hibernate/search/test/integration/jbossas7/MemberRegistrationIT.java
3) I think you can use the ZipImporter to import the artifact once it's packaged.
These are the strategies I've seen so far, I would be curious to hear some feedback.
I went with option no 3, that is I use the ZipImporter and specify the whole artifact since it's available this late in the maven build lifecycle.
I'm also wrapping all my tests inside a single integration test, but it's kind of ugly so I might investigate the alpha version as you suggested.
You are very welcome.
Just for curiosity...what are you trying to test? Could you let me know some details?
Is it a web service? Or are you testing some EJB?
This kind of feedback is very useful when developing a plugin or libraries in general.
Anyway, It's nice to be helpful.
I'm testing some thin REST facades (that do use some EJBs).
I've configured the Deployment with "testable" = false and I'm mostly interested in the deploy/start/stop capabilities of arquillian -- I'm so far not using any of the injection goodness I've seen arquillian capable of (but I might in the future).
So I could say that so far I'm using arquillian + xmlunit to do regression testing of the REST services that I'm exposing.
I normally preffer some over-grown unit tests that really want to be integration tests, but I'm not interested in testing the capabilities of the containers and this has worked well so far.
But now we're exposing some more complicated graphs of objects as xml, and the xml binding can change depending on where the object is in the graph, and I've implemented this as a MessageBodyReader/writer in RESTEasy + MOXY custom bindings and it's hard to test it out of the container.