From: mikezzz <nu...@jb...> - 2005-07-12 09:23:07
|
I think what would be sensible is make it possible (but not necessary) to run all of the tests* inside of the app server. Therefore it would be a subset of the tests that could be run outside of the app server. I have been looking at the tests that start their own instance of the MBean Server. I'm a little wary of these as a number of reasons. 1) The are far to complex to write >50% of the code is used to handle the setUp and tearDown methods (Most of this code disappears when running in the app server). 2) They rely to heavily of stubbed classes. In my experience stubbed classes simply hid problems until later on in the development process. Also it creates a lot of extra code to maintain. Its much easier to test against real instances when running in the app server. 3) They tend to be brittle, with all extra mbean management code, stubbed classes and our own depends-service.xml, breakages occur often when our code or JBoss changes. Am I willing to sacrifice an extra minute or 2 for the test suite to run, for simplicity, completeness and maintainablilty? Definitely. The JMXTestRunner does provide a mechanism to run test suite ad-hoc via the JMX Console (I generally run an app server consantly while developing). However I will make sure that the subset of tests that fall into category 1 can be run outside the app server. This can be achieved by using a fileset in the build.xml which contains the subset of Category 1 tests. I think also some of our code could be refactored to reduced dependencies. E.g. should the Mail class depend on a installed an configured SMTP protocol? *Performance test should generally be run seperately. The load testing client should also be on seperate box to more realistically similate load. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3884490#3884490 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3884490 |