[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform] Headless build, automated Junit tests and code coverage


I have got my PDE Headless build and Junit test cases running following the instructions in the below "Article-PDE-Automation" article. I took the approach of installing the eclipse automation framework components (org.eclipse.test plugin & org.eclipse.ant.optional.junit_3.2.0) in the eclipse(Ver 3.2.2).


The above setup is working fine, and we are looking at adding code coverage. I followed the emma offline instrumentation instructions to instrument Plugin jars, and also added emma to the JRE extension. The emma metadata file is generated, but the coverage file is not generated as expected after the execution of the tests.

I even added the "-Demma.coverage.out.file=<output_dir>/coverage.ec" to the vmargs of the 'suite' target in the test.xml..(the osgi.parentClassloader is also set).

Searched for the coverage file in the current directory the command-line was fired from, searched in the entire eclipse distrubition (eclipse-3.2.2 directory and below).

Has anyone encountered similar issue before? Please share on how you were able to solve it or am I missing any settings.

Regards,
--Raghu

---------------------------------------------

[news.eclipse.platform] Re: Headless build, automated Junit tests and code coverage - solution

   * From: Barry Dow <barry_dow@xxxxxxxxxx>
   * Date: Wed, 31 Aug 2005 13:27:33 +0100
   * Newsgroups: eclipse.platform
   * Organization: EclipseCorner
   * User-agent: Mozilla Thunderbird 1.0.6 (Windows/20050716)

First of all get the headless build and automated tests running as described at http://www.eclipse.org/articles/Article-PDE-Automation/automation.html.

Install EMMA and make emma.jar an extension to your JRE as per the instructions. Follow EMMA's instructions for offline mode operation of EMMA and edit the test.xml of your test plugin accordingly. I found had to instrument the jars in 'overwrite' mode.

In the 'suite' target from Fig 16 in the eclipse article mentioned above you need to add the following to the 'vmargs' property:

-Dosgi.parentClassloader=ext


This allows the eclipse classloader to find the EMMA classes.


After the tests have run, run the EMMA reporting tool.


Any problems please feel free to contact me for help.


Barry

-------------------------------------