从控制台窗口删除标准输出消息 [英] Removing Standard Output Messages from Console Window

查看:114
本文介绍了从控制台窗口删除标准输出消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用vstest在本地执行测试。

I'm using vstest to execute tests on local.

"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"

在控制台上,我收到类似以下的输出-

And over console i receive output something like this -

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文件上看到结果,但是我只是想知道有没有一种方法可以抑制控制台上的调试跟踪或标准输出消息。

Now, i don't want the debug trace with all the info when a test fails on Console. I just want passed or failed result on Console. Is there a way to do that. I know that i can see the result on trx file but i just wanted to know is there a way to suppress the debug trace or Standard Output Messages on Console.

推荐答案

使用MSTest而不是VSTest解决了我的问题。

Using MSTest instead of VSTest solved the purpose of my problem.

这篇关于从控制台窗口删除标准输出消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆