为什么带有MSTest的Opencover不执行并说"access is denied"?



我使用MSTest打开封面。我是一个新用户,试图掌握Opencover的窍门。我已经尝试过MSTest和MSTest在Vs2010中与我的新项目合作得很好。当我使用MStest执行以下测试时,它工作正常:

命令行运行MS Test:

MSTest /testmetadata:VoterDetails.vsmdi /testlist:DOBTest
结果:

C:Users<<MYuserName>>DocumentsVisual Studio 2010ProjectsVoterDetails>
MSTest /testmetadata:VoterDetails.vsmdi /testlist:DOBTest 
Microsoft (R) Test Execution Command Line Tool Version 10.0.30319.1 Copyright (c) Microsoft Corporation. All rights reserved.
Loading VoterDetails.vsmdi...
Starting execution...
Results               Top Level Tests
-------               ---------------
Passed                (DOBTest/)UT_voterDOB.VoterValidationTest.validateVoterDOB
Test
1/1 test(s) Passed
Summary
-------
Test Run Completed.
Passed  1
---------
Total   1
Results file:  C:Users<<MYuserName>>DocumentsVisual Studio 2010ProjectsVoterDetailsTestResults<<MYuserName>>.trx
Test Settings: Local

但是当我执行以下命令时,我得到以下结果:我正在张贴我尝试过的所有组合:

C:Users<<MyUserName>>AppDataLocalAppsOpenCover>OpenCover.Console.exe 
-register:user 
-target:"C:Program Files (x86)Microsoft Visual Studio 10.0Common7IDEMSTest.exe"              
-targetargs:"/testmetadata:VoterDetails.vsmdi /testlist:DOBTest" 
-filter:+[VoterDetails]*

访问被拒绝

C:Users<<MyUserName>>AppDataLocalAppsOpenCover>OpenCover.Console.exe 
-register:-arch:32 
-target:"C:Program Files (x86)Microsoft Visual Studio 10.0Common7IDEMSTest.exe" 
-targetargs:"/testmetadata:VoterDetails.vsmdi /testlist:DOBTest" 
-filter:+[VoterDetails]*  -output:coverage.xml

访问被拒绝

 C:Users<<MyUserName>>AppDataLocalAppsOpenCover>OpenCover.Console.exe 
 -target:"C:Program Files (x86)Microsoft Visual Studio 10.0Common7IDEMSTest.exe" 
 -targetargs:"/testmetadata:VoterDetails.vsmdi /testlist:DOBTest" 
 -filter:+[VoterDetails]*  
 -output:coverage.xml 
 -mergebyhash

访问被拒绝

MSTEST如何知道在哪里找到VoterDetails ?Vsmdi,当你运行在错误的文件夹;尝试从

运行OpenCover

C:Users<<MYuserName>>DocumentsVisual Studio 2010ProjectsVoterDetails

C:Users<<MyUserName>>AppDataLocalAppsOpenCover>OpenCover.Console.exe -register:user ...

-arch:32不是OpenCover的有效选项

相关内容

  • 没有找到相关文章

最新更新