Skip navigation

JBoss Tools tycho build now provides code coverage report for eclipse-test-plugins. All eclipse-test-plugin pom.xml files provide meta information about what bundles are instrumented and what classes are included in coverage report through properties:

  • emma.filter - emma filter to define what packages to include to or to exclude from report
  • emma.instrument.bundles - comma separated list of bundles to be instrumented on the fly during tests execution

 

Here is an example from org.jboss.tools.common.test plug-ins

 

<properties>
     <emma.filter>org.jboss.tools.common*</emma.filter>
     <emma.instrument.bundles>org.jboss.tools.common</emma.instrument.bundles>
</properties>

 

To enable code coverage report generation during build

 

-Dcoverage

 

system property should be added to build command line. It activates maven coverage profile to generate coverage reports on per test plug-in basis in text and xml formats. Text reports are printed out to the build console output like

 

     [echo] [EMMA v2.0.5312 report, generated Wed Jul 07 12:11:50 PDT 2010]
     [echo] -------------------------------------------------------------------------------
     [echo] OVERALL COVERAGE SUMMARY:
     [echo] 
     [echo] [class, %]     [method, %]     [block, %]     [line, %]     [name]
     [echo] 61%  (22/36)!     28%  (93/328)!     17%  (1056/6326)!     20%  (308.2/1575)!     all classes
     [echo] 
     [echo] OVERALL STATS SUMMARY:
     [echo] 
     [echo] total packages:     8
     [echo] total classes:     36
     [echo] total methods:     328
     [echo] total executable files:     28
     [echo] total executable lines:     1575
     [echo] 
     [echo] COVERAGE BREAKDOWN BY PACKAGE:
     [echo] 
     [echo] [class, %]     [method, %]     [block, %]     [line, %]     [name]
     [echo] 0%   (0/1)!     0%   (0/7)!     0%   (0/78)!     0%   (0/16)!     org.jboss.tools.common.preferences
     [echo] 0%   (0/2)!     0%   (0/40)!     0%   (0/492)!     0%   (0/125)!     org.jboss.tools.common.text
     [echo] 17%  (1/6)!     4%   (3/77)!     4%   (92/2401)!     4%   (24.9/562)!     org.jboss.tools.common.util
     [echo] 67%  (4/6)!     35%  (11/31)!     19%  (77/396)!     23%  (23.2/102)!     org.jboss.tools.common.reporting
     [echo] 75%  (6/8)!     33%  (25/75)!     21%  (367/1734)!     24%  (99.2/419)!     org.jboss.tools.common.xml
     [echo] 75%  (3/4)!     48%  (11/23)!     24%  (135/562)!     32%  (44.1/139)!     org.jboss.tools.common
     [echo] 75%  (3/4)!     42%  (23/55)!     36%  (153/422)!     36%  (52.4/144)!     org.jboss.tools.common.log
     [echo] 100% (5/5)     100% (20/20)     96%  (232/241)     95%  (64.4/68)     org.jboss.tools.common.zip
     [echo] -------------------------------------------------------------------------------


 

Reports are generated to /target/emma folder of test plug-in.

 

To enable code coverage for your test plug-in just add properties listed above to your plug-in pom.xml file and activate coverage profile as it explained above.

I needed to make some suggestions to the new Webservice testing functionallity bfitzpat is Using the RESTeasy Project Example and the WS Tester.

 

webservicetester_view.png

 

I wanted to use my little SWT to Balsamiq spy but it turned out this view used a couple of components the "Spy" did not understand,

i.e. TabFolder instead of CTabFolder and others.

 

I had to fix that, so now http://update.xam.dk contains an updated version which allows me to get a good mockup of the above.

mockup.png

Beyond supporting more components it also now ask's you if you want the full workbench converted into Mockup or

just the current View/Editor.

 

choose_workbench_or_part.png

And finally it stopped exporting unknown controls which caused Balsamiq to show an error dialog per unknown component.

Now it just gets ignored. Much easier.

 

Hope you like it.

Filter Blog

By date:
By tag: