You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Target Application

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

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

When executing your testing software you can use expressions and refer to your software through continua. For example, you can call your NUnit executable with '$Agent.NUnit.2.6.1.Path$'.

Target Application is a service

The value provided in the Target Application field is the name of a service rather than a name of a process.

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.

Target Arguments

Arguments to be passed to the target process.

Output Xml

The location and name of the output xml file. 

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.*

If you create a property collector for this action, make sure you select the Path Finder PlugIn type and give it a name that will match the pattern above in blue. Example names listed here, search the table's Plugin column for "OpenCover".

For more in-depth explanations on property collectors see Managing Property Collectors.

Alternatively, you can select the Custom option from the Using drop down list and specify a path in the resulting input field that will be displayed. Please read Why it's a good idea to use a property collector before using this option.


Coverage Filter

A list of filters to apply to selectively include or exclude assemblies and classes from coverage results. 

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 (+).

Each filter should appear on a new line.

If no Coverage Filter is provided then the +[*]* (include all assemblies and classes) filter is used.

Apply default filter

Applies the following default OpenCover filters:

-[mscorlib]*

-[mscorlib.*]*

-[System]*

-[System.*]*

-[Microsoft.VisualBasic]*

These filters are applied by default and should be applied for most applications.

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.

Note that this field does not use the PartCover Syntax.

Each exclusion should appear on a new line.

Exclude by File

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

Note that this field does not use the PartCover Syntax.

Each exclusion should appear on a new line.

Cover By Test

Gather coverage by test by analysing the assemblies that match these filters for Test methods.

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

Old Style

OpenCover will use old style instrumentation.

This instrumentation is not Silverlight friendly and is provided to support environments where mscorlib instrumentation is not working.

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.

Return target code

Return the target process return code instead of the OpenCover console return code. 

Return Code Offset

This is used to return the OpenCover console at a value outside the range returned by the target process. 

This is only applicable if Return target code is checked.

Hide Skipped

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.

Multiple values can be selected.

Show unvisited

Show a list of unvisited methods and classes after the coverage run is finished.

Generate ReportGenerator report

This generates a Code Coverage report using ReportGenerator. To generate this report, the ReportGenerator.exe must be accessible through the 'ReportGenerator.Default' property collector.

This will generate a html report to your 'Output Xml' directory in a sub-folder called 'CoverageReport'. open the 'index.htm' file to view your report

This option is designed to get you a Code Coverage report quickly and easily. If the report needs to be further configured then uncheck this option and create a new ReportGenerator action after the OpenCover action and have it point to your OpenCover Output Xml.

 

  • No labels