[Design of EJB 3.0] - Re: Instructions for SerializableMethod Unit Tests
by ALRubinger
"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
17 years, 10 months
[Design of Messaging on JBoss (Messaging/JBoss)] - Emma required on client
by timfox
I just built a distro from source, and tried to run a client and I get:
| Exception in thread "main" java.lang.NoClassDefFoundError: com/vladium/emma/rt/RT
| at org.jboss.messaging.jms.client.JBossConnectionFactory.$VRi(JBossConnectionFactory.java)
| at org.jboss.messaging.jms.client.JBossConnectionFactory.<clinit>(JBossConnectionFactory.java)
| at sun.misc.Unsafe.ensureClassInitialized(Native Method)
| at sun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(UnsafeFieldAccessorFactory.java:25)
| at sun.reflect.ReflectionFactory.newFieldAccessor(ReflectionFactory.java:122)
| at java.lang.reflect.Field.acquireFieldAccessor(Field.java:917)
| at java.lang.reflect.Field.getFieldAccessor(Field.java:898)
| at java.lang.reflect.Field.getLong(Field.java:527)
| at java.io.ObjectStreamClass.getDeclaredSUID(ObjectStreamClass.java:1586)
| at java.io.ObjectStreamClass.access$700(ObjectStreamClass.java:52)
|
!
Looks like our code has all been byte code engineered by this test coverage tool!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4156064#4156064
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4156064
17 years, 10 months
[Design of EJB 3.0] - Re: Instructions for SerializableMethod Unit Tests
by jaikiran
Andrew,
Thanks for your efforts in guiding me :)
I have checked out EJB3 project and installed Maven 2.0.9. I am new to Maven (have been using Ant) and it's going to take some time to start understanding how it works. But so far, based on the wiki that you pointed me to, the maven configuration has been smooth.
Right now, i am just going through the code/tests to see how they are structured. I have some basic questions regarding this:
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?
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"?
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?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4156048#4156048
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4156048
17 years, 10 months