Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

OpenCover is an open source code coverage utility built for .NET 2 and higher. It allows you to run code coverage tests over your .NET processes and specify filters regarding which assemblies, files or classes should be covered. [OpenCover.Console.exe]

Currently OpenCover only supports XML report output. Reports can be generated within Continua CI with either the 'Generate ReportGenerator Report' OpenCover option, or using the ReportGenerator action.

...

The name of the target application or service that will be started; this can also be a path to the target application. [-target:]

This can either be used to point to your application or service, or to your testing software executable, such as NUnit or MSTest.

...

If this is ticked, the value provided in the 'Target' field is the name of a service rather than a name of a process. [-service]

Target Directory

The directory in which to execute the target application. If the directory is provided above, then this can be an alternate path where PDB files may be found. [-targetdir:]

Target Arguments

Arguments to be passed to the target process. [-targetargs:]

Output XML

The location and name of the output XML file. [-output]

Using

The Using drop down is populated with any property collector whose namespace matches the pattern defined by the OpenCover action. The pattern for this action is ^OpenCover\.Console.*

...

Gather coverage by test by analysing the assemblies that match these filters for Test methods. [-coverbytest:]

Currently OpenCover only supports MSTest and NUnit tests for Cover by Test.

...

A list of filters to apply to selectively include or exclude assemblies and classes from coverage results.   [-filter:]

Coverage Filter uses the following PartCover syntax:  ±[module-filter]class-filter. (*) can be used as a wildcard character. An exclusion filter (-) takes precedence over an inclusion filter (+).

...

These filters are applied by default and should be applied for most applications. [-nodefaultfilters]


Exclusions

Exclude by Attribute

Exclude a class or method by filter(s) that match attributes that have been applied. An * can be used as a wildcard. [-excludebyattribute:]

Note that this field does not use the PartCover Syntax.

...

Exclude a class (or methods) by filter(s) that match the provided file names. An * can be used as a wildcard. [-excludebyfile:]

Note that this field does not use the PartCover Syntax.

...

Exclude assemblies loaded from these locations. An * can be used as a wildcard. [-excludedirs:]

Note that this field does not use the PartCover Syntax.

...

Return the target process return code instead of the OpenCover console return code. [-returntargetcode]

Return Code Offset

Offset the OpenCover return code to a value outside the range returned by the target process.

...

Removes information from the Output XML that relates to classes/modules that have been skipped (filtered) through the Coverage Filter, Exclude By Attribute or Exclude By File fields. [-hideskipped]

Multiple values can be selected.

...

Show a list of unvisited methods and classes after the coverage run is finished. [-showunvisited]

Skip auto-implemented properties

Tick to skip auto-implemented properties. [-skipautoprops]

Merge by hash

Under some scenarios e.g. using MSTest, an assembly may be loaded many times from different locations. This option is used to merge the coverage results for an assembly regardless of where it was loaded assuming the assembly has the same file-hash in each location. [-mergebyhash]

Old style

OpenCover will use old style instrumentation.

This instrumentation is not Silverlight friendly and is provided to support environments where NSCorLib instrumentation is not working. [-oldstyle]

PDB Search Directories

Alternative paths to look for PDB files. [-seearchdirs]

Generate ReportGenerator report

...

The amount of information detail to display in the build log. [-log:]

Timeout (in seconds)

How long to wait for the action to finish running before timing out. Leaving this blank (or zero) will default to 86400 seconds (24 hours).

...