Opencover在Category base上执行测试用例

时间:2017-03-13 08:39:15

标签: c# opencover

我需要使用open-cover执行测试用例dll。

C:\Users\Administrator\AppData\Local\Apps\OpenCover\OpenCover.Console.exe "-target:C:\Program Files (x86)\NUnit.org\nunit-console\nunit3-console.exe" "-targetargs:C:\TravelInsurance\BTS\src\Fortius.Services.TravelGuard.Tests\bin\Debug\WorldVentures.Fortius.Services.TravelGuard.Tests.dll" -register:Administrator

我的测试用例有一个执行条件

--where "cat == Unit" 

我应该如何添加此条件,以便它只能添加类别" Unit"这个问题是http://stackoverflow.com/questions/42691814/unexpected-token-at-position-3-in-selection-expression?noredirect=1#comment72547670_42691814

的重复

1 个答案:

答案 0 :(得分:0)

以下为我工作

C:\Users\Administrator\AppData\Local\Apps\OpenCover\OpenCover.Console.exe "-target:C:\Program Files (x86)\NUnit.org\nunit-console\nunit3-console.exe" "-targetargs:C:\TravelInsurance\BTS\src\Fortius.Services.TravelGuard.Tests\bin\Debug\WorldVentures.Fortius.Services.TravelGuard.Tests.dll --where cat==Unit " -register:Administrator