[jboss-dev-forums] [Design of EJB 3.0] - Re: Instructions for SerializableMethod Unit Tests

ALRubinger do-not-reply at jboss.com
Thu Jun 5 14:49:59 EDT 2008


"jaikiran" wrote : 1) There's a "testsuite"  containing the testcases. Based on what i see, the test cases are written in package named org.jboss.ejb3.test.[XXX].unit. Then there is also a package named org.jboss.ejb3.test.[XXX] which probably contains the required resources for the corresponding test cases (ex: If an testcase depends on a bean, then the bean implementation goes in this package). Is this correct?

Correct.

"jaikiran" wrote : 2) I also see test cases under each component, example: the proxy component has the src/test/java/org.jboss.ejb3.test.proxy.remoteaccess.unit.RemoteAccessTestCase testcase. How are these test cases different from the ones in the "testsuite"?

Here's some definitions until I can update the EJB3 Development Wiki:

"testsuite" Module = The EJB3 Integration TestSuite; deployable units intended to be installed into a running AS.  Let's leave this alone for the time being. :)

"test" Module = Backing libraries for EJB3 Unit Tests

"src/test/java" and "src/test/resources" in each Module = Unit Tests specific to that module.  These run standalone (executed by Maven as part of the "test" phase, which is in turn part of the "install" phase.  These are intended to run quickly and test fine-grained parts of a component, and this is where we need coverage for SerializableMethod.

"jaikiran" wrote : 3) Some of the testcases extend the JUnit TestCase class where as some of them use annotations @Test. Is there any convention to be followed while writing new testcases?

Newer tests are built using JUnit 4.4, which supports POJO-based testing.  So as a convention for new tests I prefer to follow the form exhibited by TestCases in EJB3 Proxy, for example.

S,
ALR

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4156080#4156080

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4156080



More information about the jboss-dev-forums mailing list