简体   繁体   English

是否可以从main方法运行NUnit测试

[英]Is it possible to run NUnit tests from the main method

The purpose of this is to be able to set the project's .exe file to automatically run on startup and have the tests run. 这样做的目的是能够将项目的.exe文件设置为在启动时自动运行并运行测试。 The tests are integrated into BrowserStack where I can view the results. 这些测试已集成到BrowserStack中,我可以在其中查看结果。 Thanks for any help! 谢谢你的帮助!

Yes, with the latest changes to the framework, it's possible to do this. 是的,通过对框架的最新更改,可以做到这一点。 Some features may not be available to you. 您可能无法使用某些功能。 For example, you probably will not be able to recover warning results, which don't throw an exception, or use multiple asserts for the same reason. 例如,您可能将无法恢复不会引发异常的警告结果,或者出于相同原因而使用多个断言。

Most recently, before the latest release, this was broken btw, so be sure to get the latest. 最近,在最新版本发布之前,此问题已被打破,因此请确保获取最新版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM