Cactus lets you run your JUnit tests inside a J2EE container while plain JUnit can only execute the tests within a vanilla JVM. This is an important difference if you want to, for example, test something that uses a DataSource from the JNDI tree or looks up an EJB from the same. In my experience, these tests are not that useful -- I prefer to mock up the JNDI context and other container-related interfaces so that I can execute the unit tests locally.
Originally posted by Jeroen Wenting: but then, you'd not test the actual interaction with the container
OTOH, testing inside the container can be painfully slow, so that we may want to run those tests less often.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus