我使用Cruise Control.NET和NAnt在我们的代码库上自动运行NUnit测试。一些测试会导致显示Windows窗体。当这些测试从VS或NUnit GUI手动运行时,它们工作正常。当通过巡航控制系统服务运行,我得到以下异常:用WinForms和NUnit自动测试
System.InvalidOperationException : Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.
短干脆不包括测试或重写测试,以便不显示的形式,还有没有其他的方法可以让我修改测试或得到NUnit在从服务中调用时运行这些测试?
此属性可以添加到单个测试方法或完整的测试夹具 – 2010-02-05 21:39:58