Kristian Waagan wrote:
Myrna van Lunteren wrote:
It seems to me that unit tests are not functionTests, and because of
that, I'd say to add a junit framework to the unit test area...
However, we obviously run the existing 'unit' tests as part of our
functionTests, so it really is one big pot at the moment. If it's
easier to add a 'unit' directory to the functionTests area, I'd have
no problems with that approach either...
This would have been easy had it not been for the existing "unit" tests. They
have their own package structure (and harness) under derbyTesting.unitTests, as
well as a bunch of .properties files in derbyTesting.functionTests.tests.unit
(and suite files under functionTests.suites...). So it seems that both of the
clean/obvious options are taken - that is unless we change or move the existing
unit tests (I think it would be confusing to mix old ("unit") and new (JUnit)
unit tests in the same package structure). I'm afraid I don't have a good
suggestion for how to solve this yet...
When it comes to separating function tests and unit tests, I think it
would make it simpler to locate the test for a specific class and that
we could more easily make configurations for running only one kind of test.
I'm a bit worried the distinction will not always be clear-cut, but I
might be wrong. And, will the unit of a unit test always be a single class?
I think you are right, it might not always be easy to say whether a specific
test is a unit test or a function test. But a separation would be advantageous,
so for now I say we try to handle this on a case by case basis.
The fact that Dyre found 17 issues, more or less severe, in a single
class, suggests more unit testing could be a way to improve the code
quality. I know it is not the "golden solution" to every problem, but
it might help us get a step further.
I absolutely agree! We apparently have too few unit tests - having a good mix of
unit tests, function tests and (non-functional and functional) "system" tests is
essential in order to be able to release a product of high quality.
--
John