Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsJunit headless plugin testing code coverage?
https://www.eclipse.org/forums/index.php/mv/msg/24503/79344/#msg_79344
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.
/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>>]]>lucas bigeardel2006-08-01T13:27:47-00:00Re: Junit headless plugin testing code coverage?
https://www.eclipse.org/forums/index.php/mv/msg/24503/79374/#msg_79374
As my text wrapping wasn't so brilliant on last post I post twice ...
/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>>>]]>lucas bigeardel2006-08-01T13:34:40-00:00Re: Junit headless plugin testing code coverage?
https://www.eclipse.org/forums/index.php/mv/msg/24503/79434/#msg_79434
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.]]>David2006-08-01T15:54:56-00:00Re: Junit headless plugin testing code coverage?
https://www.eclipse.org/forums/index.php/mv/msg/24503/79448/#msg_79448
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.
>
>]]>lucas bigeardel2006-08-01T16:53:11-00:00Re: Junit headless plugin testing code coverage?
https://www.eclipse.org/forums/index.php/mv/msg/24503/79508/#msg_79508
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]]>David2006-08-02T11:36:13-00:00Re: Junit headless plugin testing code coverage?
https://www.eclipse.org/forums/index.php/mv/msg/24503/89307/#msg_89307
You can learn about the TPTP Line Level Code Coverage tooling (including
a viewlet) for the latest release at:
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.
>
>]]>Paul Slauenwhite2006-12-04T12:31:58-00:00Re: Junit headless plugin testing code coverage?
https://www.eclipse.org/forums/index.php/mv/msg/24503/95060/#msg_95060
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
>]]>2007-04-06T18:39:40-00:00