Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipse-dev] Test coverage


Since it's just for testing purposes, you can get clover.jar onto the classpath by adding it to the java boot classpath. Eclipse only uses the standard java classpath for its initial bootstrapping, and after that it's ignored. If you add it to the boot classpath, it will be found by all plugins.  I'm not certain where you'd do this in the test framework, but my best guess is to modify the call in library.xml, in the "eclipse-test" target, where it forks the java VM.  Just set the vmargs property value to something like "-Xbootclasspath/a:c:\clover.jar". Hope that helps...

--



"Sven Van Sighem" <sven_at_work@xxxxxxxxxxx>
Sent by: eclipse-dev-admin@xxxxxxxxxxx

05/06/2003 04:49 AM
Please respond to eclipse-dev

       
        To:        <eclipse-dev@xxxxxxxxxxx>
        cc:        
        Subject:        [eclipse-dev] Test coverage



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:39
)

at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.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


Back to the top