[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [eclipse-dev] Test coverage
|
On Tuesday 06 May 2003 10:49, Sven Van Sighem wrote:
> Hello,
>
> I'm looking into a test coverage tool called Clover. It can integrate into
> a project
> via ant targets. The way it works is by "annotating" class files so that
> they send
> data to a database. This way the tool can analyse how many and which lines
> were tested. For this to work it needs to "bootstrap" itself to the build
> process.
>
> I would like to use this on Eclipse with the automated tests. I compiled
> the code
> with annotations, but I'm unable to run the test suite. This is because the
> clover.jar
> file is not on the classpath and therefor Eclipse does not find the
> necessary classes.
>
> I added clover.jar to the classpath in runtest.bat, which actually seems to
> pass this
> through to the startup classes in start.jar (i get coverage reports for
> this), but furtheron
> it seems to lose this setting.
>
> This is the error log that's generated
>
> !SESSION
> ----------------------------------------------------------------------
> !ENTRY org.eclipse.core.launcher 4 0 mei 06, 2003 10:26:36.431
> !MESSAGE Exception launching the Eclipse Platform:
> !STACK
> java.lang.NoClassDefFoundError: com/cortexeb/tools/clover/P
> at org.eclipse.core.boot.BootLoader.<clinit>(BootLoader.java:33)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:3
>9 )
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp
>l .java:25)
> at java.lang.reflect.Method.invoke(Method.java:324)
> at org.eclipse.core.launcher.Main.basicRun(Main.java:291)
> at org.eclipse.core.launcher.Main.run(Main.java:747)
> at org.eclipse.core.launcher.Main.main(Main.java:583)
>
> Can anyone help me out on how to get this jar in the classpath for the
> tests?
>
> Greatings,
>
> Sven Van Sighem
Dear Sven,
Try running test.xml from within Eclipse (Run Ant...), after adding clover.jar
to your Ant runtime classpath in the preferences. Don't forget to pass the
correct properties to test.xml when running it. You can look at the runtests
script to see what they are. It might also be necessary to pass the property
"IncludeAntRuntime = yes". If that is not enough still, try finding all
occurences of "IncludeAntRuntime = no" in the various xml scripts and replace
them with "IncludeAntRuntime = yes".
I got this to work some time ago, but it's been too long to remember all the
details. However, I do recall that a lot of tests didn't run because of them
needing Windows.
Good luck,
Magiel Bruntink