Beta测试期间检测异常 [英] Detecting Exceptions During Beta Testing

查看:107
本文介绍了Beta测试期间检测异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

(请参阅下面的更新)



在VisualStudio 2010环境中运行时,我可以轻松判断Winform应用程序是否引起异常。我只需要去调试|例外,并确保选中复选框的两列。然后,我运行该应用程序,如果有任何异常,则直接进入有问题的代码中。



在进行测试构建时,如何确定测试期间的异常测试员。我不希望测试人员像普通用户那样在Visual Studio中运行。我仍然想知道是否有例外和相关的详细信息。



我很应该控制流程,以便在代码被释放时正常执行是的,我知道并使用try / catch块,但是我说的是一种类似于Visual Studio异常捕获器和报告器的方法,只是有可能被编译到产品中



也许Visual Studio具有这样的功能,在这种情况下,应在哪里以及如何进行设置,或者可能是第三方组件。

p>

[更新:
我添加了两个子问题,您可以在未处理的异常下一行或退出



下面提到的解决方案听起来不错,并且可能需要进行一些调整



在Visual Studio中,2010年和现在的2012年都很好。在VS中断并且我说继续之后,就可以调用异常处理程序了。我决定在VS2012 IDE之外进行测试,这是件好事。操作系统捕获该错误,并向标准显示一个发生未处理的异常对话框,其中提供了详细信息以及继续和退出按钮。选择继续,仅继续应用程序,而不会陷入我的超级异常处理程序中。选择相当白的应用程序,并显示标准的关闭窗口对话框。退出按钮也不会调用我的超级处理程序。



目的是使我的异常处理程序得到调用。如果我在VS2012 IDE中工作,则不需要uber异常处理程序。处理程序的用途是面向最终用户和Beta测试人员,即除我本人之外没有我的开发站的任何人。



因此,除非我缺少任何内容,否则这个问题仍然悬而未决。



另一个问题中有代码示例,足以在几分钟内复制,粘贴和创建测试应用程序。
]



谢谢,



Sarah



以下是链接:
http://www.switchonthecode.com/tutorials/csharp-tutorial-dealing-with-unhandled-exceptions



基本上,Jradness的想法正确,只是略有错误。他应该使用

  Application.ThreadException + = 

新的System.Threading.ThreadExceptionEventHandler(Application_ThreadException);



而不是

  AppDomain.CurrentDomain.UnhandledException + = 
新的UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);

Switch on the Code的作者谈到了三种方法,第一种是JRadness提出的方法,不适用于Windows窗体。



这位导师甚至解决了我关于继续和中止的其他问题。



是的!


(see update below)

While running within the VisualStudio 2010 environment, I can easily tell if my Winform application causes an exception. I just have to go to Debug | Exceptions and make sure that both columns of checkboxes are checked. I then run the application and if any exceptions then I get dropped straight into the offending piece of code.

How do I determine exceptions during testing, when I give test build to a tester. I do not want the tester to run within Visual Studio, just as a regular user. I still want to know if there are exceptions and the pertinent details.

Obviosualy, I should be able to control the process, so that when the code gets released normal execution happens.

Yes, I know about and use try/catch blocks, but I am talking about a method similar to Visual Studio exception catcher and reporter, just possibly compiled into the product and used for deployment to beta testers.

Maybe Visual Studio has such a feature, in which case where and how to set up, or possibly a third party component.

[Update: I added two sub-questions, which you can find at Unhandled Exception next line or exit.

The solution mentioned below sounds great and with a tweak probably works, just not at the moment.

Inside the Visual Studio both 2010 and now 2012 works great. The exception handler gets called, okay after VS breaks at the line and I say to continue. I decided to test outside the VS2012 IDE, good thing for that. The OS traps the bug, shows the standard an "An Unhandled Exception Occurred" dialog giving the details along with a continue and quit buttons. Selecting continue, just continues the application with no trapping into my uber exception handler. Selecting quite, whites-out the application and displays the standard close window dialog. The quit button also does not call my uber handler.

The purpose is so that my exception handler gets called. I do not need an uber exception handler if I am working inside the VS2012 IDE. The purpose of the handler is for end users and beta testers, namely anyone other than myself and who will not have my development station.

So unless I am missing something, the question is still open.

There are code samples in the other question, enough to copy and paste and create a test application in a couple minutes time. ]

Thanks in advance,

Sarah

解决方案

Okay, the Google Uberlord took pitty upon me and I found this wonderful article solving the problem. Praise to the almighty Google.

Here is the link: http://www.switchonthecode.com/tutorials/csharp-tutorial-dealing-with-unhandled-exceptions

Basically, JRadness had the right idea, just slightly in error. He should have used

Application.ThreadException += 

new System.Threading.ThreadExceptionEventHandler(Application_ThreadException);

rather than

AppDomain.CurrentDomain.UnhandledException += 
    new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);

The author on Switch on the Code talked of three methods, the first of which is what JRadness proposed and does not work for Windows forms.

The autor even solved my other question of Continue and Abort. The OS got bypassed.

Yeah!!

这篇关于Beta测试期间检测异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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