As Huachaitou Peek said, you can always build your JAR with EJB's and deploy it manually into the app server. In this way you have the fine control on the overall packaging, deployment and server startup process.
If you are interested in building a more complex
testing environment I would suggest using the following:
-
OpenEJB implementation - it's a lighweight EJB container,
-
JBoss Arquillian -
JUnit runner which control the deployment process on whatever container you choose (in this case it's OpenEJB but you can use i.e. JBoss as well),
-
JBoss ShrinkWrap - tool which allows you to create your deployment package 'on-the-fly'; you don't have to prepare JAR with your EJB's manually; the prepared archive is treated as a deployment which should be used with Arquillian,
-
JUnit itself for running tests.
It might seem a lot of new stuff if you're new in the EE world, but after you know what's happening (by manually packaging, deploying, etc.) it really gives you a
boost.
PS. I use Eclipse with all these tools, but it really isn't a 'must' requirement.
Cheers!