We use http://sourceforge.net/projects/junitejb for testing the resource adapter we wrote and are quite happy with it. It's included in the Jboss source code, and you can also find some samples of usage there (look for testcases that extend EJBTestCase). The sourceforge site does not contain any documentation as far as I can see.
It enables you to write unittests that are executed on the server without having to write client code. So it's pretty much the same as writing normal unit tests.
Using junitejb is probably better than what I'm about to suggest for most of your purposes, since it (I think, I haven't looked) runs your calls through the regular ejb interceptor stack, supplying transactions, security, etc, and everything the ConnectionManager wants and needs to do its job. If you want more isolated tests that are still running inside jboss you can also write an mbean to do them, deploy the mbean in a test-service.xml file, and call the mbean's methods from your junit test. I'd subclass JBossTestCase, it has utility methods to help with this.
There are a couple of examples of doing this in cvs head in ....test/jca/inflow.
David, and Arno thanks for the tips. I went with the junitejb for now and after figurign out how I need to deploy the whole setup, it's working well.
That being said I have a couple question about junitejb
1. How does one go about producing the normal output of junit like junit.textui.TestRunner provides or possibly even some of the fancier html type output. It seems as if the EJBTestRunner output configurability is limited to stacktraces in whatever console created it.
2. where are the intercept points for configuring the test output?
Code samples greatly appreciated.