dotCover 2019.1ヘルプ

コンソールランナーコマンド

dotCoverコンソールランナーは以下のコマンドを提供します:

  • cover - 指定されたアプリケーションのカバレッジ分析を実行します。

  • cover-everything - オールインワンタスク。dotCover.exeの後に起動されたすべての.NETプロセスのカバレッジ分析を実行します。

  • cover-service - オールインワンタスク。指定されたWindowsサービスのカバレッジ分析を実行します。

  • cover-iis - オールインワンタスク。IISサーバー上で実行されているWebアプリケーションのカバレッジ分析を実行します。

  • delete - 指定されたスナップショットに関連するすべてのファイルを削除します。

  • help - コンソールランナーのヘルプを表示します。

  • list - 指定されたスナップショットに関連するすべてのファイルのリストを取得します。

  • merge - 複数のカバレッジスナップショットをマージします。

  • report - 指定されたスナップショットのレポートを作成します。

  • version - dotCoverのバージョン情報を指定のファイルに書き込みます。

  • zip - カバレッジスナップショットを圧縮します。

  • send - 指定したdotCover.exeインスタンスにコマンドを送信します。

help に続けてコマンド名を入力すると、コンソールの各コマンドに関するすべてのことを知ることができます。すべてのコマンド(ヘルプを含む)には対応するショートカットがあります。たとえば、analyse コマンドに関する情報を取得するには、次のように入力します。

dotCover.exe help analyse
または
dotCover h a

カバー

cover: Performs coverage analysis of the specified application. usage: dotCover cover [parameters] Valid parameters: /TargetExecutable=ARG : (Required) File name of the program to analyze /TargetArguments=ARG : (Optional) Program arguments /TargetWorkingDir=ARG : (Optional) Program working directory /TempDir=ARG : (Optional) Directory for auxiliary files. Set to the system temp by default /Output=ARG : (Required) Path to the resulting coverage snapshot/report /ReportType=ARG : (Optional) [HTML|JSON|XML|DetailedXML|NDependXML]. Specify to get a report of a certain type instead of a snapshot /HideAutoProperties : (Optional) Remove auto-implemented properties from report /ExcludeFileMasks : (Optional, works only if /ReportType is specified) Remove specified files from report. The parameter is a semicolon-separated list of file path masks. Ant-style patterns are supported here (e.g. ProjectFolder/**/*.generated.cs) /InheritConsole=ARG : (Optional) [True|False] Lets the application being analyzed to inherit dotCover console. True by default Please note that windows of analyzed GUI application will not be hidden if the console is inherited /AnalyzeTargetArguments=ARG : (Optional) [True|False] Specifies whether dotCover should analyze target arguments string and convert relative paths to absolute there. True by default /Scope : (Optional) Allows Including not loaded assemblies in the specified scope into coverage results. The parameter is a semicolon separated list of file path masks. Ant-style patterns are supported here (e.g. ProjectFolder/**/*.dll) /Filters=ARG : (Optional) Specifies coverage filters. Syntax: +:module=*;class=*;function=*; Use -:myassembly to exclude an assembly from code coverage. Asterisk wildcard (*) is supported here /AttributeFilters=ARG : (Optional) Specifies attribute filters. Syntax: filter1;filter2;... Asterisk wildcard (*) is supported here /DisableDefaultFilters : (Optional) Disables default (automatically added) filters /SymbolSearchPaths=ARG : (Optional) Specifies additional symbol search paths. Paths to symbol servers (starting with srv* prefix) are supported here. Values are separated with semicolon /AllowSymbolServerAccess : (Optional) Allows dotCover to search for PDB files on a symbol server /ReturnTargetExitCode : (Optional) Returns the exit code of the target executable in case coverage analysis succeeded /ProcessFilters=ARG : (Optional) Specifies process filters. Syntax: +:process1;-:process2;... Asterisk wildcard (*) is supported here /UseApi=ARG : (Optional) [True|False] Whether to use CoverageProfiler Api. False by default /RemoteApiEndpoint=ARG : (Optional) Endpoint for RemoteApi feature. Syntax: IPv4Address:Port /StartInstance=ARG : (Optional) Starts new dotCover.exe instance in the background and waits until it is initialized. ARG is the instance ID. Use this ID to send commands to this dotCover.exe instance /Instance=ARG : (Optional) Assigns an instance ID to the current dotCover.exe instance. Use this ID to send commands to this dotCover.exe /CoverImmediately=ARG : (Optional) [True|False] Specifies whether to start coverage analysis immediately after launch. True by default /StartInstanceTimeout=ARG : (Optional) Timeout in seconds for the /StartInstance parameter. Default is 20 /DisableNGen : (Optional) Disables NGen images loading Global parameters: /LogFile=ARG : (Optional) Enables logging and specifies log file name It is possible to specify part of the parameters or all of them in the configuration file. usage: dotCover cover <configuration file name> [parameters] Configuration file format: <CoverageParams> <TargetExecutable><!-- File name of the program to analyse. --></TargetExecutable> <TargetArguments><!-- Program arguments. --></TargetArguments> <TargetWorkingDir><!-- Program working directory. --></TargetWorkingDir> <TempDir><!-- Directory for the auxiliary files. Set to system temp by default. --></TempDir> <Output><!-- Path to the resulting coverage snapshot. --></Output> <InheritConsole> <!-- [True|False] Lets the application being analysed to inherit dotCover console. True by default. --> </InheritConsole> <AnalyseTargetArguments> <!-- [True|False] Specifies whether dotCover should analyse target arguments string and convert relative paths to absolute there. True by default. --> </AnalyseTargetArguments> <!-- Appends coverage results with assemblies in specified scope that were not loaded during analysis. Ant-style patterns are supported here. <Scope> <ScopeEntry>ProjectFolder/**/*.dll</ScopeEntry> <ScopeEntry>ProjectFolder/**/*.exe</ScopeEntry> </Scope> --> <!-- Coverage filters. It's possible to use asterisks as wildcard symbols. <Filters> <IncludeFilters> <FilterEntry> <ModuleMask> Module mask </ModuleMask> <ClassMask> Class mask </ClassMask> <FunctionMask> Function mask </FunctionMask> </FilterEntry> </IncludeFilters> <ExcludeFilters> <FilterEntry>...</FilterEntry> <FilterEntry>...</FilterEntry> <FilterEntry>...</FilterEntry> </ExcludeFilters> </Filters> --> <!-- Attribute filters. It's possible to use asterisks as wildcard symbols. <AttributeFilters> <AttributeFilterEntry> Attribute class mask </AttributeFilterEntry> <AttributeFilterEntry> System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute </AttributeFilterEntry> </AttributeFilters> --> </CoverageParams>

cover-everything

cover-everything: Performs coverage analysis of all .NET processes started after dotCover.exe. usage: dotCover cover-everything [parameters] Valid parameters: /StartInstance=ARG : (Required) Starts new dotCover.exe instance in the background and waits until it is initialized. ARG is the instance ID. Use this ID to send commands to this dotCover.exe instance. Not required if /Instance is specified /Instance=ARG : (Required) Assigns an instance ID to the current dotCover.exe instance. Use this ID to send commands to this dotCover.exe instance. Not required if /StartInstance is specified /CoverImmediately=ARG : (Optional) [True|False] Specifies whether to start coverage analysis immediately after launch. True by default /StartInstanceTimeout=ARG : (Optional) Timeout in seconds for the /StartInstance parameter. Default is 20 /Output=ARG : (Required) Path to the resulting coverage snapshot/report /ReportType=ARG : (Optional) [HTML|JSON|XML|DetailedXML|NDependXML]. Specify to get a report of a certain type instead of a snapshot /HideAutoProperties : (Optional) Remove auto-implemented properties from report /ExcludeFileMasks : (Optional, works only if /ReportType is specified) Remove specified files from report. The parameter is a semicolon-separated list of file path masks. Ant-style patterns are supported here (e.g. ProjectFolder/**/*.generated.cs) /TempDir=ARG : (Optional) Directory for auxiliary files. Set to the system temp by default /Scope : (Optional) Allows Including not loaded assemblies in the specified scope into coverage results. The parameter is a semicolon separated list of file path masks. Ant-style patterns are supported here (e.g. ProjectFolder/**/*.dll) /Filters=ARG : (Optional) Specifies coverage filters. Syntax: +:module=*;class=*;function=*; Use -:myassembly to exclude an assembly from code coverage. Asterisk wildcard (*) is supported here /AttributeFilters=ARG : (Optional) Specifies attribute filters. Syntax: filter1;filter2;... Asterisk wildcard (*) is supported here /DisableDefaultFilters : (Optional) Disables default (automatically added) filters /SymbolSearchPaths=ARG : (Optional) Specifies additional symbol search paths. Paths to symbol servers (starting with srv* prefix) are supported here. Values are separated with semicolon /AllowSymbolServerAccess : (Optional) Allows dotCover to search for PDB files on a symbol server /ProcessFilters=ARG : (Optional) Specifies process filters. Syntax: +:process1;-:process2;... Asterisk wildcard (*) is supported here /DisableNGen : (Optional) Disables NGen images loading Global parameters: /LogFile=ARG : (Optional) Enables logging and allows specifying a log file name It is possible to specify a part of the parameters or all of them in the configuration file. usage: dotCover cover-everything <configuration file name> [parameters] Configuration file format is described in the autogenerated sample. usage: dotCover help cover-everything <configuration file name>

cover-service

cover-service: Performs coverage analysis of the specified Windows Service. usage: dotCover cover-service [parameters] Valid parameters: /ServiceName=ARG : (Required) Name of the service to analyze /ServiceArguments=ARG : (Optional) Service arguments /StartDependentServices=ARG : (Optional) [True|False] Specifies whether dependent services must be started. False by default /TempDir=ARG : (Optional) Directory for auxiliary files. Set to the system temp by default /Output=ARG : (Required) Path to the resulting coverage snapshot/report /ReportType=ARG : (Optional) [HTML|JSON|XML|DetailedXML|NDependXML]. Specify to get a report of a certain type instead of a snapshot /HideAutoProperties : (Optional) Remove auto-implemented properties from report /ExcludeFileMasks : (Optional, works only if /ReportType is specified) Remove specified files from report. The parameter is a semicolon-separated list of file path masks. Ant-style patterns are supported here (e.g. ProjectFolder/**/*.generated.cs) /AnalyzeServiceArguments=ARG : (Optional) [True|False] Specifies whether dotCover should analyze arguments string and convert relative paths to absolute there. True by default /Scope : (Optional) Allows Including not loaded assemblies in the specified scope into coverage results. The parameter is a semicolon separated list of file path masks. Ant-style patterns are supported here (e.g. ProjectFolder/**/*.dll) /Filters=ARG : (Optional) Specifies coverage filters. Syntax: +:module=*;class=*;function=*; Use -:myassembly to exclude an assembly from code coverage. Asterisk wildcard (*) is supported here /AttributeFilters=ARG : (Optional) Specifies attribute filters. Syntax: filter1;filter2;... Asterisk wildcard (*) is supported here /DisableDefaultFilters : (Optional) Disables default (automatically added) filters /SymbolSearchPaths=ARG : (Optional) Specifies additional symbol search paths. Paths to symbol servers (starting with srv* prefix) are supported here. Values are separated with semicolon /AllowSymbolServerAccess : (Optional) Allows dotCover to search for PDB files on a symbol server /UseApi=ARG : (Optional) [True|False] Whether to use CoverageProfiler API. False by default /RemoteApiEndpoint=ARG : (Optional) Endpoint for RemoteApi feature. Syntax: IPv4Address:Port /StartInstance=ARG : (Optional) Starts new dotCover.exe instance in the background and waits until it is initialized. ARG is the instance ID. Use this ID to send commands to this dotCover.exe instance /Instance=ARG : (Optional) Assigns an instance ID to the current dotCover.exe instance. Use this ID to send commands to this dotCover.exe instance /CoverImmediately=ARG : (Optional) [True|False] Specifies whether to start coverage analysis immediately after launch. True by default /StartInstanceTimeout=ARG : (Optional) Timeout in seconds for the /StartInstance parameter. Default is 20 Global parameters: /LogFile=ARG : (Optional) Enables logging and allows specifying a log file name It is possible to specify a part of the parameters or all of them in the configuration file. usage: dotCover cover-service <configuration file name> [parameters] Configuration file format is described in the autogenerated sample. usage: dotCover help cover-service <configuration file name>

cover-iis

cover-iis: Performs coverage analysis of a web application running on a IIS server usage: dotCover cover-iis [parameters] Valid parameters: /TempDir=ARG : (Optional) Directory for auxiliary files. Set to the system temp by default /Output=ARG : (Required) Path to the resulting coverage snapshot/report /ReportType=ARG : (Optional) [HTML|JSON|XML|DetailedXML|NDependXML]. Specify to get a report of a certain type instead of a snapshot /HideAutoProperties : (Optional) Remove auto-implemented properties from report /ExcludeFileMasks : (Optional, works only if /ReportType is specified) Remove specified files from report. The parameter is a semicolon-separated list of file path masks. Ant-style patterns are supported here (e.g. ProjectFolder/**/*.generated.cs) /Scope : (Optional) Allows Including not loaded assemblies in the specified scope into coverage results. The parameter is a semicolon separated list of file path masks. Ant-style patterns are supported here (e.g. ProjectFolder/**/*.dll) /Filters=ARG : (Optional) Specifies coverage filters. Syntax: +:module=*;class=*;function=*; Use -:myassembly to exclude an assembly from code coverage. Asterisk wildcard (*) is supported here /AttributeFilters=ARG : (Optional) Specifies attribute filters. Syntax: filter1;filter2;... Asterisk wildcard (*) is supported here /DisableDefaultFilters : (Optional) Disables default (automatically added) filters /SymbolSearchPaths=ARG : (Optional) Specifies additional symbol search paths. Paths to symbol servers (starting with srv* prefix) are supported here. Values are separated with semicolon /AllowSymbolServerAccess : (Optional) Allows dotCover to search for PDB files on a symbol server /UseApi=ARG : (Optional) [True|False] Whether to use CoverageProfiler Api. False by default /RemoteApiEndpoint=ARG : (Optional) Endpoint for RemoteApi feature. Syntax: IPv4Address:Port /StartInstance=ARG : (Optional) Starts new dotCover.exe instance in the background and waits until it is initialized. ARG is the instance ID. Use this ID to send commands to this dotCover.exe instance /Instance=ARG : (Optional) Assigns an instance ID to the current dotCover.exe instance. Use this ID to send commands to this dotCover.exe instance /CoverImmediately=ARG : (Optional) [True|False] Specifies whether to start coverage analysis immediately after launch. True by default /StartInstanceTimeout=ARG : (Optional) Timeout in seconds for the /StartInstance parameter. Default is 20 Global parameters: /LogFile=ARG : (Optional) Enables logging and allows specifying a log file name It is possible to specify part of the parameters or all of them in the configuration file. usage: dotCover cover-iis <configuration file name> [parameters] Configuration file format is described in the autogenerated sample. usage: dotCover help cover-iis <configuration file name>

削除

delete: Delete all files related to the specified snapshots. usage: dotCover delete <configuration file> Valid options: /Source=ARG : List of snapshot files separated with semicolon (;) Global options: /LogFile=ARG : Enables logging and specifies log file name Configuration file format: <DeleteParams> <!-- At least one source required. --> <Source><!-- Source file 1 --></Source> <Source><!-- Source file 2 --></Source> <Source><!-- Source file N --></Source> </DeleteParams>

ヘルプ

help: Show console runner help. Type 'dotCover help <command>' for help on a specific command, parameters and configuration xml format Type 'dotCover help <command> <file name>' to write configuration xml example to the specified file

リスト

list: Obtain list of all files related to the specified snapshots. usage: dotCover list [parameters] Valid parameters: /Source=ARG : (Required) List of snapshot files separated with semicolon (;) /Output=ARG : (Required) Resulting file name. Stores plain list of all snapshot files. Global parameters: /LogFile=ARG : (Optional) Enables logging and specifies log file name It is possible to specify part of the parameters or all of them in the configuration file. usage: dotCover list <configuration file name> [parameters] Configuration file format: <ListParams> <!-- At least one source required. --> <Source><!-- Source file 1 --></Source> <Source><!-- Source file 2 --></Source> <Source><!-- Source file N --></Source> <Output><!-- Resulting file name. Stores plain list of all snapshot files. --></Output> </ListParams>

マージ

merge: Merge several coverage snapshots. usage: dotCover merge [parameters] Valid parameters: /Source=ARG : (Required) List of snapshots separated with semicolon (;) /Output=ARG : (Required) File name for the merged snapshot /TempDir=ARG : (Optional) Directory for the auxiliary files. Set to system temp by default Global parameters: /LogFile=ARG : (Optional) Enables logging and specifies log file name It is possible to specify part of the parameters or all of them in the configuration file. usage: dotCover merge <configuration file name> [parameters] Configuration file format: <MergeParams> <!-- At least one source required. --> <Source><!-- Source file 1 --></Source> <Source><!-- Source file 2 --></Source> <Source><!-- Source file N --></Source> <TempDir><!-- Directory for the auxiliary files. Set to system temp by default. --></TempDir> <Output><!-- File name for the merged snapshot. --></Output> </MergeParams>

報告する

report: Create a report by the specified snapshot. usage: dotCover report [parameters] Valid parameters: /Source=ARG : (Required) Coverage snapshot file name /Output=ARG : (Required) Resulting report file name /ReportType=ARG : (Optional) [HTML|JSON|XML|DetailedXML|NDependXML]. A type of the report. XML by default /HideAutoProperties : (Optional) Remove auto-implemented properties from report /ExcludeFileMasks : (Optional) Remove specified files from report. The parameter is a semicolon separated list of file path masks. Global parameters: /LogFile=ARG : (Optional) Enables logging and specifies log file name It is possible to specify part of the parameters or all of them in the configuration file. usage: dotCover report <configuration file name> [parameters] Configuration file format: <ReportParams> <Source><!-- Coverage snapshot file name. --></Source> <Output><!-- Resulting report file name. --></Output> <ReportType> <!-- [HTML|JSON|XML|NDependXML]. A type of the report. XML by default. --> </ReportType> </ReportParams>

バージョン

version: Write dotCover version info to the specified file. usage: dotCover version <output file name> Global options: /LogFile=ARG : Enables logging and specifies log file name

ジップ

zip: Compress coverage snapshot. usage: dotCover zip <configuration file> Valid options: /Source=ARG : Coverage snapshot file name /Output=ARG : Zipped snapshot file name Global options: /LogFile=ARG : Enables logging and specifies log file name <ZipParams> <Source><!-- Required. Coverage snapshot file name. --></Source> <Output><!-- Required. Zipped snapshot file name. --></Output> </ZipParams>

送信する

send: Sends a command to the specified dotCover.exe instance. usage: dotCover send [parameters] Valid parameters: /Instance=ARG : (Required) ID of the target dotCover.exe instance /Command=ARG : (Required) [Cover|Pause|GetSnapshotAndKillChildren] Command to send Cover - Start coverage analysis Pause - Pause coverage analysis GetSnapshotAndKillChildren - Save current coverage data, kill all profiled processes and stop the instance /Timoeut=ARG : (Optional) Timeout in seconds for command execution. Default is 10 Global parameters: /LogFile=ARG : (Optional) Enables logging and allows specifying a log file name
最終更新日: 2019年5月7日

関連事項

関連ページ:

コンソールランナーの設定

コンソールランナーは2つの方法で設定可能です。XML構成ファイルを介して。コマンドラインパラメータを通じて。これら2つのアプローチは混在する可能性があります。この場合、コマンドラインで指定されたパラメータはXMLで指定されたものを上書きします。コンソールランナーパラメータで相対パスを指定することが可...

カバレッジ結果の操作

どのタイプのカバレッジ解析、ユニットテストのカバレッジ、アプリケーションのカバレッジ、またはサーバー側のテストのカバレッジを問わず、dotCoverはカバレッジ結果をカバレッジスナップショットに保存します。その後、次のいずれかの方法でこれらの結果をさらに詳しく調べることができます。カバレッジ結果ブラ...

コマンドラインからのカバレッジ分析

コードインスペクションを実行してコマンドラインから分析を複製することもできます。dotCoverコンソールランナーは、dotCoverディストリビューションパッケージに含まれるコマンドラインツールです: このツールを使用するあらゆるテストランナー(MSTest、NUnit、xUnit、MSpecなど...

JetBrains TeamCityでカバレッジを設定する

通常、.NETソリューションの継続的インテグレーション(CI)ビルドは、テストのコンパイルと実行を含む一連のタスクで構成されています。JetBrains TeamCityCIサーバーに関しては、これらのタスクはビルドステップと呼ばれます。TeamCityはdotCoverコンソールランナーにバンドル...