On Mon, Dec 28, 2009 at 11:31 AM, Steven Boscarine <steven.boscarine@childrens.harvard.edu> wrote:
I am personally eager for the standalone CDI bootstrap because I am currently using Glassfish for my JEE 6 apps. 

Embedding a JBoss AS container is probably pretty inappropriate for tests of an application that isn't deployed to JBoss AS. 

In the future you will be able to use GlassFish V3 as the container (remote and possibility embedded) so that's not really the issue. The real question is, do you need to run a test in a real container when a CDI bootstrap would do? Here's the argument we made in the CDI TCK.

Some tests can work without a full container. In the CDI TCK, we call these tests "standalone" tests, versus tests which do require a full container, called "integration" tests. Every standalone test can also be run as an integration test, but not the other way around. While the standalone tests don't need the container, it is also important to run them as integration tests as a final check just to make sure that there is nothing they conflict with (or have side effects) when run in a real container.

So you make as many tests standalone as possible for a quick test run, but ultimately you can (but don't have to) run all of your tests in the container. The result of this strategy has been a bullet proof validation of the code base.


Dan Allen
Senior Software Engineer, Red Hat | Author of Seam in Action
Registered Linux User #231597