コードカバレッジから一部のコードを除外するために.runsettingsファイルを使用していますが、コードカバレッジのパーセンテージがまったく変更されていないため、コードカバレッジから除外していません。エラーもありません。コードカバレッジからクラスを除外 - .runsettings
コード:
<CodeCoverage>
<ModulePaths>
<Include>
<ModulePath>.*\.dll$</ModulePath>
</Include>
<Exclude>
<ModulePath>.*\.test.dll</ModulePath>
<ModulePath>.*\.csv.dll</ModulePath>
</Exclude>
</ModulePaths>
<Functions>
<Exclude>
<!-- CORE -->
<Function>xxx.DI.Mobile.Core.ViewModels.HomeAndContents.xxx</Function>
<Function>xxx.DI.Mobile.Core.ViewModels.Components.xxxx</Function>
<Function>xxx.DI.Mobile.Core.ViewModels.Components.xxx</Function>
<!-- xxx -->
<Function>^xxx\.DI\.Mobile\.Core\.xxx\.ViewModels\.xxx\.xxx$</Function>
<Function>^xxx\.DI\.Mobile\.Core\.xxx\.ViewModels\.xxx\.xxx$</Function>
<Function>.*\.xxx\.DI\.Mobile\.Core\.xxx\.ViewModels\.xxx\.xxx$</Function>
<Function>.*xxx\.DI\.Mobile\.Core\.xxx\.ViewModels\.Dashboard\.xxx$</Function>
</Exclude>
</Functions>
<UseVerifiableInstrumentation>True</UseVerifiableInstrumentation>
<AllowLowIntegrityProcesses>True</AllowLowIntegrityProcesses>
<CollectFromChildProcesses>True</CollectFromChildProcesses>
<CollectAspDotNet>False</CollectAspDotNet>
</CodeCoverage>
長いクラス名は、各クラスのフルパスのちょうどドット表記です。名前空間の区切りには\.
を使います。
namespace xxx.DI.Mobile.Core.State.ViewModels.xxx
{
public class xxx : yyy
{
はその後、それはそうのような機能タグに行く:
は私のクラスの一つの例がある私の機能タグでこれらの正規表現をしようと
<Function>xxx.DI.Mobile.Core.State.ViewModels.xxx.xxx</Function>
が、どれもまだ働いていません:
<Function>^xxx\.DI\.Mobile\.Core\.xxx\.ViewModels\.Vehicle\.xxx$</Function>
<Function>^xxx\.DI\.Mobile\.Core\.xxx\.ViewModels\.Vehicle\.xxx$</Function>
<Function>.*\.xxx\.DI\.Mobile\.Core\.xxx\.ViewModels\.Policies\.xxx$</Function>
<Function>.*xxx\.DI\.Mobile\.Core\.xxx\.ViewModels\.Dashboard\.xxx$</Function>
<Function>xxx\.DI\.Mobile\.Core\.xxx\.ViewModels\.Common\.xxx</Function>
なぜそれがコードカバレッジから私のコードのいずれかを除外していませんか?