测试在Visual Studio则成功独立,失败的设置 [英] Testing in Visual Studio Succeeds Individually, Fails in a Set
问题描述
当我在Visual Studio中运行我的测试个人,他们都通过没有问题。然而,当我运行所有的人一下子一些通有的失败。我试图把以1秒的暂停在每个测试方法之间没有成功。
任何想法?在此先感谢您的帮助......
这可能是因为你有一些共享的数据。检查中的类在使用中,这意味着一个测试静态成员变量设置一个值,导致随后的测试失败。
您也可以调试单元测试。根据您所使用的框架,你应该能够运行的框架工具,调试启动应用程序传递路径编译的程序集作为参数。</ P>
When I run my tests in Visual Studio individually, they all pass without a problem. However, when I run all of them at once some pass and some fail. I tried putting in a pause of 1 second in between each test method with no success.
Any ideas? Thanks in advance for your help...
It's possible that you have some shared data. Check for static member variables in the classes in use that means one test sets a value that causes a subsequent test to fail.
You can also debug unit tests. Depending on the framework you're using, you should be able to run the framework tool as a debug start application passing the path to the compiled assembly as a parameter.
这篇关于测试在Visual Studio则成功独立,失败的设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!