I was going to be able to start GF embedded and in different test suites (as defined by TestNG) be able to deploy different parts to GF and undeploy at the end of a suite). Creating jars in a temp directory just to deply them could work but is not that appealing as simply create archives on the fly.
The tests would use EJB, JPA, JTA, possibly JMS (via an MDB), we strongly rely on CDI to bind everything together. As of now we don't have any web services, but we might as there are talks about it. We will not test the web tier (our team is focused on the backend). Bascially the EJB tier I think.
I am not completely sure what the difference between GF embedded and EJB embedded is. According to what I read in GF embedded server guide, embedded EJB requires a standalone GF installation - this makes it much less comfortable to use than GF embedded as a whole, run in the same process (I don't know what EJB emdedded does with the installed GF, though - does it start it? does it only reuse its jars?). But maybe I am wrong, please correct me if so.
What I would like to do it to start GF, add modules to it, and possiblt also add other jars. For a given project that I want to test, 'the other jars' would be for example all projects the tested module depends on (so: JPA module, common module, DAO module, a remote services (EJB) interface module, ...) and also any external dependencies (we use a slightly modified EclipseLink while waiting for our bugfix to be incorporated, jasper reports, and many many others) so I think we would require to add jars to the classpath of a deployed application. To test such an application we would have to package it somehow so that GF can deploy it; this would mean that we package it in a WAR with all the libs, or EAR. Again, please correct me if wrong.
We are now gradually getting into this testing, and we are gathering information on how to do this correctly, that's why I ask these questions.
[Message sent by forum member 'szczyp']
http://forums.java.net/jive/thread.jspa?messageID=471009