dotCover 2025.3 ヘルプ

コマンドリファレンス

dotCover コマンドラインツールは、次のコマンドを提供します。

  • cover - 指定されたアプリケーション、テストプロジェクト、または任意の dotnet コマンドのカバレッジ分析を実行します。

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

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

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

  • help - コマンドラインツールのヘルプを表示します。

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

dotCover help cover

カバー

dotCover cover — Run coverage analysis on a specified application or test project ================================================================================= Usage: dotCover cover <options> [-- <target arguments>] dotCover cover @<args-file> [@<args-file2> ...] [<options>] Description: Runs coverage analysis for the specified executable, .NET test project, or any dotnet command. If no executable is specified, dotCover will try to automatically run 'dotnet'. Options: --target-executable <path> Path to the application or test runner to analyze. If omitted, dotCover will auto-detect the 'dotnet' CLI. --target-arguments <args> Command-line arguments to pass to the target executable. You can omit the parameter and specify them after a double dash: -- arg1 arg2 --target-working-directory <path> Application working directory. By default, it's the target’s directory. --snapshot-output <path> Path to save the raw coverage snapshot ('.dcvr'). Autogenerated if omitted. Filter options: --exclude-assemblies <list> Comma-separated list of assembly names to exclude from analysis. Wildcards (*) allowed, e.g., *.Tests You can specify this option multiple times; all values will be combined. --exclude-attributes <list> Comma-separated list of fully qualified attribute names. Code marked with these will be excluded, e.g., System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute Wildcards (*) allowed. You can specify this option multiple times; all values will be combined. --exclude-processes <list> Comma-separated list of process names to ignore during analysis. Wildcards (*) allowed. You can specify this option multiple times; all values will be combined. Report options: --json-report-output <path> Paths to save formatted JSON report. --json-report-covering-tests-scope <level> Granularity for including covering tests in JSON reports: [none|assembly|type|method|statement] --xml-report-output <path> Paths to save formatted XML report. --xml-report-covering-tests-scope <level> Granularity for including covering tests in XML reports: [none|assembly|type|method|statement] Advanced options: --temporary-directory <path> Directory for temporary files. By default, it's the system temp folder. --use-api Control the coverage session using the profiler API. --no-ngen Disable loading of NGen images during coverage. --log-file <path> Enable logging and specify the path to the log file. Notes: - You can use response files with the '@<args-file>' syntax to simplify command lines. Examples: dotCover cover --json-report-output report.json -- test dotCover cover @args.txt

マージ

dotCover merge — Combine multiple coverage snapshots into one ============================================================= Usage: dotCover merge <options> dotCover merge @<args-file> [@<args-file2> ...] [<options>] Description: Merges two or more coverage snapshots (.dcvr files) into a single snapshot. This is useful when coverage was collected in separate test runs (e.g., with different test frameworks or target platforms). Options: --snapshot-source <list> Required. Comma-separated list of source snapshot files to merge. --snapshot-output <path> Path to save the merged snapshot (.dcvr). If omitted, a file name will be generated automatically. Advanced options: --temporary-directory <path> Directory for temporary files. By default, it's the system temp folder. --log-file <path> Enable logging and specify the path to the log file. Notes: - You can use response files with the '@<args-file>' syntax to simplify command lines. Examples: dotCover merge --snapshot-source run1.dcvr,run2.dcvr --snapshot-output merged.dcvr dotCover merge @merge-args.txt

報告する

dotCover report — Generate a coverage report from a snapshot ============================================================ Usage: dotCover report <options> dotCover report @<args-file> [@<args-file2> ...] [<options>] Description: Creates a formatted report (XML or JSON) from a coverage snapshot (.dcvr). Options: --snapshot-source <path> Required. Path to the coverage snapshot file (.dcvr). --json-report-output <path> Paths to save formatted JSON report. --json-report-covering-tests-scope <level> Granularity for including covering tests in JSON reports: [none|assembly|type|method|statement] --xml-report-output <path> Paths to save formatted XML report. --xml-report-covering-tests-scope <level> Granularity for including covering tests in XML reports: [none|assembly|type|method|statement] Advanced options: --log-file <path> Enable logging and specify the path to the log file. Notes: - You can use response files with the '@<args-file>' syntax to simplify command lines. Examples: dotCover report --snapshot-source merged.dcvr --xml-report-output report.xml dotCover report @report-args.txt

バージョン

dotCover version — Write the current dotCover version to a file =============================================================== Usage: dotCover version [options] Description: Write the current version to a specified file. Options: --text-output <path> Path to save the version information as plain text. Examples: dotCover version dotCover version --text-output version.txt

ヘルプ

dotCover help — Show help for dotCover CLI commands =================================================== Usage: dotCover help [<command>] Description: Displays detailed help for a specific command. Available commands: cover Run coverage analysis on an application or test project merge Combine multiple coverage snapshots into one report Generate a coverage report from a snapshot version Display the current dotCover version help Show help on commands Examples: dotCover help cover
2025 年 7 月 25 日