EclEmma-Java Code Coverage for Eclipse (Eclipse code coverage plug-in)

EclEmma-Java Code Coverage for Eclipse

Brief introduction

First, we look at the official website of the plugin description:

I. Overview
EclEmma IS A as Free Java code coverages Tool for Eclipse, the Available an under at The Eclipse Public License It Brings code coverages the Analysis Directly INTO at The Eclipse Workbench:.
  EclEmma Eclipse is free Java code coverage tool, available under the Eclipse Public License. Code coverage analysis will be introduced directly into the Eclipse workbench:
Fast Develop / the Test Cycle: Launches the WITHIN like JUnit the Test at The Workbench runs Analyzed for code CAN BE Directly from coverages.
  Rapid development / test cycle: direct analysis JUnit test run start in the table for code coverage.
Rich coverage analysis: Coverage results are immediately summarized and highlighted in the Java source code editors.
  Rich coverage analysis: Summary and immediately coverage results are highlighted in the Java source code editor.
Non-invasive: EclEmma does not require modifying your projects or performing any other setup.
  Non-invasive: EclEmma not need to modify your project or perform any other settings.
Since version 2.0 EclEmma is based on the JaCoCo code coverage library. The Eclipse integration has its focus on supporting the individual developer in an highly interactive way. For automated builds please refer to JaCoCo documentation for integrations with other tools.
  Starting with version 2.0, EclEmma based JaCoCo covering library code. Eclipse integrated focus in a highly interactive way to support a single developer. For automated build, see JaCoCo documentation for integration with other tools.
Originally EclEmma was inspired by and technically based on the great EMMA library developed by Vlad Roubtsov.
  Original inspiration came from EclEmma technically based on the great EMMA library Vlad Roubtsov development.
Update Site for EclEmma IS at The http://update.eclemma.org/ . EclEmma at The IS Also the Available Via the Eclipse Marketplace Client, Simply Search for "EclEmma."
  EclEmma update site is http://update.eclemma.org/. EclEmma can also be obtained by Eclipse Marketplace Client, just search for "EclEmma" to

Second, characteristics

  1. EclEmma added a so-called startup mode for the Eclipse workbench. It is called Coverage mode, it works exactly the same as the conventional and Run Debug mode. Can activate the "cover" start-up mode from the toolbar "Run" menu or table:
    Eclemma
    simply launch the application or the unit test coverage information can be collected in the Coverage mode. Supports the following startup types:
    (1) local Java application
    (2) Eclipse / RCP applications
    (3) Equinox OSGi framework
    (4) JUnit Test
    (5) TestNG test
    (6) JUnit plug-in test
    (7) JUnit RAP test
    ( 8) SWTBot test
    (9) Scala application

  2. A request or upon termination of the target application, Eclipse workbench will automatically provide code coverage information:
    (1) coverage Overview: "Coverage" view lists the coverage summary Java project, to allow in-depth method level.
    (2) Source Highlight: the results of the session are covered Java source code editor directly visible. Customizable color highlighted code completely, and the line portion uncovered. This applies to your own source code and the source code has been added to detect external libraries.
    Other features to support your test coverage analysis:
    (1) different counters: select whether an instruction should be aggregated, branch, line, method, type, or circle complexity.
    (2) covering the plurality of sessions: the coverage data can switch between multiple sessions.
    (3) Merge sessions: If you want to consider several different tests run for analysis, you can easily merge session.

  3. Although EclEmma primarily for test run and analyze the Eclipse workbench and design, but it provides a number of import / export capabilities.
    Perform data import: Import Wizard allows JaCoCo start from the outside .exec perform data files.
    Export coverage report: Coverage data can be HTML, XML or CSV format export, can also be exported as JaCoCo perform data file (
    .exec).

installation

Method one: Install from Eclipse Marketplace Client

  1. Select Help → Eclipse Marketplace Eclipse from the menu
    Select Help → Eclipse Marketplace Eclipse from the menu
  2. Search "EclEmma"
    (because they have installed, thus indicating Uninstall)
    Search "EclEmma"
  3. Click "Install" for entry "EclEmma Java code coverage"
  4. Installation according to the steps in the wizard.

Method two: Install the update site

EclEmma update site is http://update.eclemma.org/. Follow these steps to install from the update site EclEmma:

  1. Select Help → Install New Software menu from Eclipse
    Select Help → Install New Software menu from Eclipse

  2. Click on "Add"
    Here Insert Picture Description

  3. Name: coverage (custom)
    the Location: http://update.eclemma.org/
    install

  4. Next on the list

use

  1. Write a test code
  2. Click Coverage As
    Click Coverage As
  3. View Results
    View Results
    green line represents the complete coverage of the
    row of yellow partially covered (some of branch miss)
    red line has not been executed
Published 118 original articles · won praise 479 · views 210 000 +

Guess you like

Origin blog.csdn.net/y_universe/article/details/83353614