我正在使用 vstest 在本地执行测试。
"C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe\" "C:\Debug\Solution.dll /Tests:VerifyTest1,VerifyTest2 /Logger:trx"
在控制台上我收到这样的输出 -
Passed VerifyTest1
Failed VerifyTest2
Standard Output Messages:
TestContext Messages:
1/29/2016 21:50:00 - START - START : [VerifyTest2]
1/29/2016 21:50:00 - INFO - Operating System - Microsoft Windows 10 Enterprise
1/29/2016 21:50:00 - INFO - Test Environment - Test1
1/29/2016 21:50:00 - INFO - Test Environment - Test1
1/29/2016 21:50:00 - INFO - File updated
1/29/2016 21:50:02 - INFO - Login Complete! via UI API's
1/29/2016 21:50:03 - INFO - eb481527-49f6-49bc-a9ca-9ccf4e10d12a submitted successfully.
1/29/2016 21:50:11 - PASS - Return created through UI
1/29/2016 21:50:11 - INFO - Checking Process launched or NOT
1/29/2016 21:50:11 - INFO - Process: My.CommonUIFramework.Shell is launched
1/29/2016 21:50:11 - INFO - Terminating the Process: My.CommonUIFramework.Shell
1/29/2016 21:50:11 - INFO - Checking Process launched or NOT
1/29/2016 21:50:11 - INFO - Process: My.Xion.DataMigration.UI is NOT launched
1/29/2016 21:50:12 - INFO - Launched the Application : My.CommonUIFramework.Shell
1/29/2016 21:50:12 - INFO - Checking Process launched or NOT
现在,当控制台上的测试失败时,我不希望调试跟踪包含所有信息。我只想在控制台上通过或失败结果。有没有办法做到这一点。我知道我可以在 trx 文件上看到结果,但我只是想知道有没有办法在控制台上抑制调试跟踪或标准输出消息。