作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我已经在我的开发环境中运行了一个简单的 WatiN 网络测试,并试图让它在 TFS 构建服务器上运行。 WatiN 正在触发异常:
System.Threading.ThreadStateException: The CurrentThread needs to have it's ApartmentState set to ApartmentState.STA to be able to automate Internet Explorer.
测试运行器 VSTestHost 应该默认使用 STA 线程。我还尝试通过 .testrunconfig 文件明确强制它进入 STA。 WatiN还是不高兴。我在 Windows Server 2008 上使用 Visual Studio/TFS 2008。
有没有其他人遇到过这个问题并找到了解决方案?
最佳答案
您可能想检查/使用 WatiN 测试方法的 [STAThread]
属性
关于visual-studio-2008 - 在 VSTestHost 下运行 WatiN 测试的线程问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/927064/
对于我的项目,我正在使用集成的 Visual Studio 单元测试框架,但我遇到了一些以前从未见过的问题。 我的一个类(class)导致 VSTestHost 崩溃。所以首先我认为这是因为有一堆代码
Microsoft 单元测试框架突然罢工了。 当我尝试在 VS2008 中运行测试时,我收到一个对话框,其中显示消息“VSTestHost.exe 已停止工作”。 我在 Vista 上运行了 Visu
我已经在我的开发环境中运行了一个简单的 WatiN 网络测试,并试图让它在 TFS 构建服务器上运行。 WatiN 正在触发异常: System.Threading.ThreadStateExcept
我是一名优秀的程序员,十分优秀!