Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Test and Performance Tools Platform (TPTP) » Junit headless plugin testing code coverage?
Junit headless plugin testing code coverage? [message #79344] Tue, 01 August 2006 13:07 Go to next message
David is currently offline David
Messages: 5
Registered: July 2009
Junior Member
Hello there!

We are in the process of creating (actually porting) some old apps to
Eclipse plugins. We are building the eclipse plugins via Cruise Control
and have our version control system in Clearcase. We have after reading (
http://www.eclipse.org/articles/Article-PDE-Automation/autom ation.html )
managed to figure out how to exceute an Junit plugin test via cruise
control as an normal command task just. Great now our plugins can be
tested !

The next caveat is to try and get coverage of the Junit plugin tests. How
does the developers involved in Eclipse.org do this currently, do every
developer run their own coverage tools to improve the coverage rate, or is
there some magical tool that goes through all junit plugin tests and runs
those aginst the plugins to measure the coverage?

We have now gone through Nounit, and Cobertura with trying to set this up
to measure test code coverage to no sucess. We can get Cobertura/Nounit to
report back on things that are normal Junit tests, but not junit plugin
tests, thus our coverage is very low.

I guess our last hope is to try Emma (http://emma.sf.net) seems soemone
has had luck with this at least
( http://dev.eclipse.org/newslists/news.eclipse.platform/msg44 478.html)
unless there is some documentation for how to set this up for Eclipse
plugin tests. We have profiled the Junit plugin test via TPTP and that
works but it does not give us the line / branch coverage that we would
want, also we want to excecute it from cruise control (headless) on a
regular basis.

Any ideas?

Best regards

Dave
Re: Junit headless plugin testing code coverage? [message #79359 is a reply to message #79344] Tue, 01 August 2006 13:27 Go to previous messageGo to next message
lucas bigeardel is currently offline lucas bigeardel
Messages: 155
Registered: July 2009
Senior Member
Hi,

I would say that it seems to be possible to run TPTP JUnit Line Coverage in
batch mode under Linux according to the run.sh you can find in the zip file
:
http://www.eclipse.org/downloads/download.php?file=/tptp/4.2 .0.1/TPTP-4.2.0.1-200607211630/org.eclipse.tptp.platform.cov erage.core-TPTP-4.2.0.1.zip

=====================================

#!/bin/sh

LD_LIBRARY_PATH=/projets/qualif/JREs/linux/IBMJava2-142/jre/ bin:/projets/qualif/JREs/linux/IBMJava2-142/jre/bin/classic: /projets/qualif/JREs/linux/IBMJava2-142/jre/bin:/usr/lib/Sun Java2-1.4.2/jre/lib/i386/client:/usr/lib/SunJava2-1.4.2/jre/ lib/i386:/usr/lib/SunJava2-1.4.2/jre/../lib/i386:/opt/mozill a/lib:/usr/lib:deploy/lib

export LD_LIBRARY_PATH

/projets/qualif/JREs/linux/IBMJava2-142/jre/bin/java -Xcheck:jni -XrunpiLLCAgent:LLC.deploy,../testLLC/llc.selected
-Dcom.ibm.ra.llc.rawreport=/projets/attolcov/workspace/com.i bm.ra.llc/llc.xml -Dcom.ibm.ra.llc.verbose=false -classpath ../testLLC/bincom.ibm.ra.llc.test.MyTestedClass============= =========================If you want to integrate it in PDE Build + JUnit test process it should onlybe a matter of CLASSPATH settings and pointing to the right eclipse-testingdir in your test.xmlI have some doubts on the fact this would work with a sun JDK 1.5 or lateras I experienced some strange LLV... errors on level 1.5 code.Hope this helps.- Lucas"David Samuelsson" <david.samuelsson@sonyericsson.com> wrote in messagenews:b5b0949772c55cfa2f7ba2dfd4b335a4$1@www.eclipse.org...> Hello there!>> We are in the process of creating (actually porting) some old apps toEclipse plugins. We are building the eclipse plugins via Cruise Control andhave our version control system in Clearcase. We have after reading ( http://www.eclipse.org/articles/Article-PDE-Automation/autom ation.html )managed to figure out how to exceute an Junit plugin test via cruise controlas an normal command task just. Great now our plugins can be tested !>> The next caveat is to try and get coverage of the Junit plugin tests. Howdoes the developers involved in Eclipse.org do this currently, do everydeveloper run their own coverage tools to improve the coverage rate, or isthere some magical tool that goes through all junit plugin tests and runsthose aginst the plugins to measure the coverage?>> We have now gone through Nounit, and Cobertura with trying to set this upto measure test code coverage to no sucess. We can get Cobertura/Nounit toreport back on things that are normal Junit tests, but not junit plugintests, thus our coverage is very low.>> I guess our last hope is to try Emma (http://emma.sf.net) seems soemonehas had luck with this at least( http://dev.eclipse.org/newslists/news.eclipse.platform/msg44 478.html)unless there is some documentation for how to set this up for Eclipse plugintests. We have profiled the Junit plugin test via TPTP and that works but itdoes not give us the line / branch coverage that we would want, also we wantto excecute it from cruise control (headless) on a regular basis.>> Any ideas?>> Best regards>> Dave>>
Re: Junit headless plugin testing code coverage? [message #79374 is a reply to message #79359] Tue, 01 August 2006 13:34 Go to previous messageGo to next message
lucas bigeardel is currently offline lucas bigeardel
Messages: 155
Registered: July 2009
Senior Member
Hi,

As my text wrapping wasn't so brilliant on last post I post twice ...

So, here is my answer :

I would say that it seems to be possible to run TPTP JUnit Line Coverage in
batch mode under Linux according to the run.sh you can find in the zip file
:
http://www.eclipse.org/downloads/download.php?file=/tptp/4.2 .0.1/TPTP-4.2.0.1-200607211630/org.eclipse.tptp.platform.cov erage.core-TPTP-4.2.0.1.zip

=====================================

#!/bin/sh

LD_LIBRARY_PATH=/projets/qualif/JREs/linux/IBMJava2-142/jre/ bin:/projets/qualif/JREs/linux/IBMJava2-142/jre/bin/classic: /projets/qualif/JREs/linux/IBMJava2-142/jre/bin:/usr/lib/Sun Java2-1.4.2/jre/lib/i386/client:/usr/lib/SunJava2-1.4.2/jre/ lib/i386:/usr/lib/SunJava2-1.4.2/jre/../lib/i386:/opt/mozill a/lib:/usr/lib:deploy/lib

export LD_LIBRARY_PATH

/projets/qualif/JREs/linux/IBMJava2-142/jre/bin/java -Xcheck:jni -XrunpiLLCAgent:LLC.deploy,../testLLC/llc.selected
-Dcom.ibm.ra.llc.rawreport=/projets/attolcov/workspace/com.i bm.ra.llc/llc.xml -Dcom.ibm.ra.llc.verbose=false -classpath../testLLC/bincom.ibm.ra.llc.test.MyTestedClass=== ===================================If you want to integrate it in PDE Build + JUnit test process it shouldonlybe a matter of CLASSPATH settings and pointing to the righteclipse-testing dir in your test.xml.I have some doubts on the fact this would work with a sun JDK 1.5 or lateras I experienced some strange LLV... errors on level 1.5 code with the UIversion.Hope this helps.- Lucas"lucas bigeardel" <lucas.bigeardel@gmail.com> wrote in messagenews:eanks9$v9d$1@utils.eclipse.org...> Hi,>> I would say that it seems to be possible to run TPTP JUnit Line Coveragein batch mode under Linux according to the run.sh you can find in the zipfile :http://www.eclipse.org/downloads/download.php?file=/tptp/4. 2.0.1/TPTP-4.2.0.1-200607211630/org.eclipse.tptp.platform.co verage.core-TPTP-4.2.0.1.zip>> =====================================>> #!/bin/sh>> LD_LIBRARY_PATH=/projets/qualif/JREs/linux/IBMJava2-142/jre/ bin:/projets/qualif/JREs/linux/IBMJava2-142/jre/bin/classic: /projets/qualif/JREs/linux/IBMJava2-142/jre/bin:/usr/lib/Sun Java2-1.4.2/jre/lib/i386/client:/usr/lib/SunJava2-1.4.2/jre/ lib/i386:/usr/lib/SunJava2-1.4.2/jre/../lib/i386:/opt/mozill a/lib:/usr/lib:deploy/lib >> export LD_LIBRARY_PATH>>/projets/qualif/JREs/linux/IBMJava2-142/jre/bin/java -Xcheck:jni -XrunpiLLCAgent:LLC.deploy,../testLLC/llc.selected -Dcom.ibm.ra.llc.rawreport=/projets/attolcov/workspace/com.i bm.ra.llc/llc.xml -Dcom.ibm.ra.llc.verbose=false -classpath../testLLC/bincom.ibm.ra.llc.test.MyTestedClass=== ===================================If you want to integrate it in PDE Build + JUnit test process itshould onlybe a matter of CLASSPATH settings and pointing to the righteclipse-testingdir in your test.xmlI have some doubts on the fact this wouldwork with a sun JDK 1.5 or lateras I experienced some strange LLV... errorson level 1.5 code.Hope this helps.- Lucas"David Samuelsson"<david.samuelsson@sonyericsson.com> wrote inmessagenews:b5b0949772c55cfa2f7ba2dfd4b335a4$1@www.eclipse.org...> Hellothere!>> We are in the process of creating (actually porting) some old appstoEclipse plugins. We are building the eclipse plugins via Cruise Controlandhave our version control system in Clearcase. We have after reading( http://www.eclipse.org/articles/Article-PDE-Automation/autom ation.html )managed to figure out how to exceute an Junit plugin test via cruise controlasan normal command task just. Great now our plugins can be tested !>> Thenext caveat is to try and get coverage of the Junit plugin tests. Howdoesthe developers involved in Eclipse.org do this currently, do everydeveloperrun their own coverage tools to improve the coverage rate, or isthere somemagical tool that goes through all junit plugin tests and runsthose aginstthe plugins to measure the coverage?>> We have now gone through Nounit, andCobertura with trying to set this upto measure test code coverage to nosucess. We can get Cobertura/Nounit toreport back on things that are normalJunit tests, but not junit plugintests, thus our coverage is very low.>> Iguess our last hope is to try Emma (http://emma.sf.net) seems soemonehas hadluck with this atleast( http://dev.eclipse.org/newslists/news.eclipse.platform/msg44 478.html)unless there is some documentation for how to set this up for Eclipseplugintests. We have profiled the Junit plugin test via TPTP and that worksbut itdoes not give us the line / branch coverage that we would want, alsowe wantto excecute it from cruise control (headless) on a regular basis.>>Any ideas?>> Best regards>> Dave>>>
Re: Junit headless plugin testing code coverage? [message #79434 is a reply to message #79374] Tue, 01 August 2006 15:54 Go to previous messageGo to next message
David is currently offline David
Messages: 5
Registered: July 2009
Junior Member
We are an all windows shop =(

Is there any documentation regarding this? The zip file does not give away
so much, any examples on reports?

Will this work for Eclipse 3.1.2? As we are stuck at that version
currently.
Re: Junit headless plugin testing code coverage? [message #79448 is a reply to message #79434] Tue, 01 August 2006 16:53 Go to previous messageGo to next message
lucas bigeardel is currently offline lucas bigeardel
Messages: 155
Registered: July 2009
Senior Member
I'm doing my investigations on Linux / Eclipse Calisto 3.2 / TPTP 4.2 / ...

I don't know about backward compatibility or reports so far sorry.

regards,

- Lucas

"David Samuelsson" <david.samuelsson@sonyericsson.com> wrote in message
news:efbb26bb6ac286d422f2083d8832d0ad$1@www.eclipse.org...
> We are an all windows shop =(
>
> Is there any documentation regarding this? The zip file does not give away
> so much, any examples on reports?
>
> Will this work for Eclipse 3.1.2? As we are stuck at that version
> currently.
>
>
Re: Junit headless plugin testing code coverage? [message #79508 is a reply to message #79448] Wed, 02 August 2006 11:36 Go to previous messageGo to next message
David is currently offline David
Messages: 5
Registered: July 2009
Junior Member
Ok, seems we managed to get emma to work though, so that is nice, just
trying to get through cobertura one more time before we finally give up on
that since emma started working. hence my other post here in TPTP.

/Dave
Re: Junit headless plugin testing code coverage? [message #89307 is a reply to message #79434] Mon, 04 December 2006 12:31 Go to previous messageGo to next message
Paul Slauenwhite is currently offline Paul Slauenwhite
Messages: 970
Registered: July 2009
Senior Member
Hi David,
You can learn about the TPTP Line Level Code Coverage tooling (including
a viewlet) for the latest release at:

http://www.eclipse.org/tptp/home/downloads/downloads.php >> Technology
Preview >> Code Coverage

Paul
"David Samuelsson" <david.samuelsson@sonyericsson.com> wrote in message
news:efbb26bb6ac286d422f2083d8832d0ad$1@www.eclipse.org...
> We are an all windows shop =(
>
> Is there any documentation regarding this? The zip file does not give away
> so much, any examples on reports?
>
> Will this work for Eclipse 3.1.2? As we are stuck at that version
> currently.
>
>
Re: Junit headless plugin testing code coverage? [message #95060 is a reply to message #79508] Fri, 06 April 2007 18:39 Go to previous message
Eclipse User
Originally posted by: kathir.atc.tcs.com

Hi,
I am also struck with using cobertura. did you get successful through
cobertura?

It would be great if you can give the steps on using emma to work with
plugin testing code coverage. I am struck with getting the coverage
reports for my junit plugin projects.

Br,
Kathir.

David Samuelsson wrote:
> Ok, seems we managed to get emma to work though, so that is nice, just
> trying to get through cobertura one more time before we finally give
> up on that since emma started working. hence my other post here in TPTP.
>
> /Dave
>
Previous Topic:no profiling views with 4.3.1 Tracing and Profiling
Next Topic:[AGR] ClassCastException in Verification Hook
Goto Forum:
  


Current Time: Sat Sep 20 06:03:26 GMT 2014

Powered by FUDForum. Page generated in 0.06441 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software