-
1. Re: Instructions for SerializableMethod Unit Tests
alrubinger Jun 4, 2008 5:24 AM (in response to alrubinger)Forgot to mention:
Many of the dependencies for the project are in the JBoss Maven Repositories, which you'll need to configure:
http://wiki.jboss.org/wiki/MavenSettings
http://wiki.jboss.org/wiki/MavenSettingsExample
S,
ALR -
2. Re: Instructions for SerializableMethod Unit Tests
alrubinger Jun 4, 2008 5:25 AM (in response to alrubinger)Oh, and use Maven 2.0.9; 2.0.8 will give you unpredictable results.
S,
ALR -
3. Re: Instructions for SerializableMethod Unit Tests
jaikiran Jun 5, 2008 12:38 PM (in response to alrubinger)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? -
4. Re: Instructions for SerializableMethod Unit Tests
alrubinger Jun 5, 2008 2:49 PM (in response to 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 -
5. Re: Instructions for SerializableMethod Unit Tests
jaikiran Jun 6, 2008 4:56 AM (in response to alrubinger)Thanks Andrew. This should be enough to get started with the testcase.
-
6. Re: Instructions for SerializableMethod Unit Tests
jaikiran Jun 6, 2008 11:21 AM (in response to alrubinger)Andrew,
I have updated the JIRA with the test cases and other details. Any review comments/suggestions are most welcome :)
Btw, is there a way/goal/target through which i can generate html reports of these test? -
7. Re: Instructions for SerializableMethod Unit Tests
alrubinger Jun 6, 2008 12:56 PM (in response to alrubinger)Jaikiran:
I've reviewed and committed your tests, and have opened http://jira.jboss.com/jira/browse/EJBTHREE-1407 to address the failures you've exposed. Next step is to resolve this. :)"jaikiran" wrote:
Btw, is there a way/goal/target through which i can generate html reports of these test?
http://maven.apache.org/plugins/maven-surefire-report-plugin/
Also note that the text containing the output and client-side errors are in target/surefire-reports.
S,
ALR -
8. Re: Instructions for SerializableMethod Unit Tests
alrubinger Jun 7, 2008 1:54 AM (in response to alrubinger)I've fixed EJBTHREE-1407; thanks to Jaikiran for finding these and providing tests with great coverage.
Apologies for not leaving these for you to fix; any failing testsuite has to be resolved before we can successfully complete a build. Hard and fast rule here in EJB3 looking forward. We have a (unit) TestSuite now at 100%, and we will be building onto it without allowing any regression to seep in.
S,
ALR -
9. Re: Instructions for SerializableMethod Unit Tests
jaikiran Jun 9, 2008 4:29 AM (in response to alrubinger)"ALRubinger" wrote:
"jaikiran" wrote:
Btw, is there a way/goal/target through which i can generate html reports of these test?
http://maven.apache.org/plugins/maven-surefire-report-plugin/
Also note that the text containing the output and client-side errors are in target/surefire-reports.
S,
ALR
Thanks!