To follow up:

Is it okay if I then create a JIRA issue and attach a patch proposing
an update of the pom/pom.xml to include:

junit 4.0
easymock 2.4
AND
mockito 1.7

When that patch has been committed, I have some tests available
for the new device access subproject based on junit/ mockito.


regards, dennis

On 16 mrt 2009, at 11:19, Stuart McCulloch wrote:

2009/3/14 Dennis Geurts <[email protected]>


On 14 mrt 2009, at 09:48, Filippo Diotalevi wrote:

On Fri, Mar 13, 2009 at 10:46 AM, Dennis Geurts
<[email protected]> wrote:

Hi all,
Some questions about testing within the Apache Felix project in general:
The pom/pom.xml defines dependencies to:
- easymock 1.2 (the jdk1.3 type) and
- junit 3.8.1
Is there a special rationale for using these versions ?
I can understand the need being able to support jdk 1.4 and earlier for
the
actual delivered binaries, but does/ should this also hold for the tests
?
I've seen enormous improvements in both junit 4 and easymock 2.4 and
(like
to) use it in my tests.


Hi Dennis,
thank you so much for raising this point, I think it's very important. As other people reminded, there might be reason to stay (tests run on
old devices) with jdk 1.4.

However, imho, sticking to jdk 1.4 is preventing Felix to have
comprehensive test suite. In my projects I use JUnit4 and mockito and
I can easily reach a 70% coverage; on the other side, having written
unit tests for the fileinstall bundle, I can certify how painful,
improductive and fragile are tests written with easymock 1.2 (let me
just add, the improvement would be much higher moving to mockito
rather then easymock 2.4).

So I think that's the tradeoff to discuss: being able to run tests on
old devices, or having Java5-based test tools so we can write more
complete unit tests?

wdyt?


Hi Filippo,

I'd personally favor being able to write (lots of) tests that are readable/
understandable, especially if the codebase is being maintained by a
larger group of people. Anything we can do to encourage people to write
tests
should be considered. (imho)


definitely, more tests would be very welcome and I think we don't have to
restrict
ourselves to 1.4 based tests everywhere - also note that we have the new BND
/
JUnit based testing harness for adding framework tests:

  http://felix.apache.org/site/bnd-testing-harness.html

which itself requires a Java5 JDK to run (because it uses the latest BND
version)


Dennis


--
Filippo Diotalevi


--
Cheers, Stuart

Reply via email to