db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Knut Anders Hatlen <Knut.Hat...@Sun.COM>
Subject Re: Test count dropping?
Date Thu, 26 Oct 2006 15:54:32 GMT
Bryan Pendleton <bpendleton@amberpoint.com> writes:

>>> Did a number of tests recently get removed from derbyall?
>> Most of the JUnit tests have been removed from derbyall. See
>> DERBY-1952. To run the JUnit tests, you now need to invoke a JUnit
>> test runner directly, for instance:
>> java junit.textui.TestRunner \
>>      org.apache.derbyTesting.functionTests.suites.All
> Thanks Knut Anders, that makes perfect sense.
> I tried running those tests, and indeed they seem to work in my environment.
> At least, my system whirs and hums for a while and ........ gets printed
> and then OK.
> I guess I was feeling a little insecure because I didn't get the
> "traditional" results like derbyall_pass.txt, etc.
> In this new JUnit world, with tests that cleverly enable and disable
> themselves based on environment, configuration, etc., how does a
> developer inspect the JUnit run to verify that the desired set of
> tests actually did get run?

That's a good question! I had the same problem earlier today when I
discovered that BlobClob4BlobTest used more time alone than the entire
All suite. The first thing I tried in order to verify that
BlobClob4BlobTest actually was running as part of All, was to start
the Swing test runner (junit.swingui.TestRunner, and remember the
-noloading option!). There I could browse all the test that would be
run, and it did indeed report that BlobClob4BlobTest was being
run. Since I did not completely trust those results (All still ran
faster than BlobClob4BlobTest), I wrote my own test runner which
printed the name of each test case that had been run and how long each
test case had run. Still the same results: BlobClob4BlobTest was
running under All, only faster. I finally found out why (DERBY-2004),
but it took me quite some time to convince myself that the test was

Writing a JUnit test runner is really easy, by the way. I have
attached the test runner I wrote as an example.

Knut Anders

View raw message