"rachmatowicz(a)jboss.com" wrote :
| But I believe there are still problems here:
| 1. JBossTestCase uses logging provided by BaseTestCase, but it does not call setUp()
or tearDown(). Also, test class constructors seem to get called by JUnit before setUp()
methods. Thus, I believe that any use of logging in JBossTestCase (for example, when
handling exceptions in initDelegate()) will not be properly initialised by that time, as
setUp() will not yet have been called.
|
Doing initialization from the ctor is bad. This should be moved to a setUp/tearDown.
"rachmatowicz(a)jboss.com" wrote :
| 2. The setUp() and tearDown() methods are called each time a testcase is run. So it
appears that logging will be set up and torn down for every test case, as opposed to once
every test suite. It may be more appropriate to arrange things so that either this setup
was done in a one time setup/teardown wrapper, as in AbstractTestCaseWithSetup, or arrange
for logging setup outside of the methods setUp() and tearDown(). But
AbstractTestCaseWithSetup would probably need some alteration as it is currently tuned to
run with Joram tests. See related:
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=91386&am...
|
This is a function of how you run the test. If we are running multiple tests there should
be a TestSuite wrapper. If your running a single tests from within an ide you want a per
test setUp/tearDown.
"rachmatowicz(a)jboss.com" wrote :
| 3. If setUp() and tearDown() are used as the means for initialising logging, would it
help programmers if those methods were overridden in JBossTestCase to call super.setUp()
and super.tearDown(), to make it more obvious that there was important work being done in
superclasses with these methods?
|
The JBossTest* classes in the jbossas suite need to be brought in synch with the base test
project classes. If there are changes needed to do that in the test project, that is fine
as long as they are discussed.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3986283#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...