PythonCoverage

MacroModule
genre InfoManagement
author Ruben Stein
package FMEwork/ReleaseMeVis
definition PythonCoverage.def
keywords coverage, metric, python, quality, measure

Purpose

This module allows to control the measurement of Python code coverage.

Usage

First add required additional package/module exclusions. To measure coverage, press Start, execute the Python code to be measured, then press Stop.

Select an export format and a path to export to and press Export.

Details

The following exclusions are always added:

  • */TestSupport/*
  • */TestCenterAdvanced/*
  • */MLABPythonTools/*
  • */*.script*
  • */*.def*
  • *@@scriptconsole*
  • */PythonCoverage.py

Windows

Default Panel

../../../Projects/PythonCoverage/Modules/mhelp/Images/Screenshots/PythonCoverage._default.png

Parameter Fields

Field Index

Coverage Exclusions: String started: Bool
Coverage Inclusions: String Stop: Trigger
Erase: Trigger  
Export: Trigger  
Export Path: String  
exportFormat: Enum  
running: Bool  
Start: Trigger  

Visible Fields

Start

name: start, type: Trigger

Starts measurement of coverage.

Stop

name: stop, type: Trigger

Stops measurement of coverage.

Erase

name: erase, type: Trigger

Erase data collected so far.

Export

name: export, type: Trigger

Export the collected data in the selected format.

Export Path

name: exportPath, type: String

Path where the coverage HTML is exported to.

Coverage Exclusions

name: additionalCoverageExclusions, type: String

Comma-separated exclusions for the Python coverage measurement

Coverage Inclusions

name: coverageInclusions, type: String

Comma-separated inclusions for the Python coverage measurement. If empty, all files are included that are not excluded.

Hidden Fields

running

name: running, type: Bool, default: FALSE

started

name: started, type: Bool, default: FALSE

exportFormat

name: exportFormat, type: Enum, default: HTML

Select the format for exporting.

Values:

Title Name Description
HTML HTML Creates a HTML page.