“瓦廷”加里奥IE”表现不好?
我正在进行大约 300 个 Watin 测试,并使用 Gallio 测试运行程序在 IE 中运行它们。这些测试需要大约三个半小时才能完成。我想知道这里的每个人是否都看到了与 Watin 相同的表演,或者我正在做一些非常错误的事情。在这方面,我想知道
- 您是否正在使用任何特定的浏览器/测试运行器来使 watin 测试快速运行
- 您是否遵循任何允许并行运行 watin 测试的特定设计模式
- 您是否遵循任何允许我运行多个测试的设计模式在同一个浏览器实例中进行测试,这样我就不必在每次测试后关闭并打开浏览器
I am having around 300 Watin tests and I run them in IE using Gallio test runner. These tests take around three and half hours to run completely. I was wondering if everyone here sees the same kind of performance with Watin or I'm doing something terribly wrong. In this regard I would like to know if
- You are using any specific browser/test runner that makes watin tests run fast
- You are following any specific design pattern that enables running watin tests in parallel
- You are following any design pattern that allows me to run multiple tests in the same browser instance so that I do not have to close and open the browser after every test
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不知道如何并行运行它们,但您当然可以重复使用相同的浏览器实例,您只需要对其进行静态引用。我使用的是 MSpec,因此代码有点不同,但如果您只有一个包含浏览器引用或类似内容的静态类,那么应该对其进行排序。
作者还写了一篇关于它的博客,但这个方法比我必须做的任何事情都要复杂得多:
http://watinandmore.blogspot.com/2009 /03/reusing-ie-instance-in-vs-test.html
另一个需要检查的想法是,除非需要,否则您不会“键入”文本。例如:
比这个花费更长的时间:
因为在第一行中,它单独键入每个字符。您可能需要这样做来检查您的 JavaScript,但通常不需要。
I don't know about running them in parallel, but you can certainly re-use the same browser instance, you just need a static reference to it. I'm using MSpec so the code is a bit different, but if you just have a static class containing the browser reference or similar, that should sort it.
The author also wrote a blog about it, but this method is much more complex than anything I've had to do:
http://watinandmore.blogspot.com/2009/03/reusing-ie-instance-in-vs-test.html
Another think to check is that you're not 'typing' text unless you need to. For example this:
Takes much longer than this:
Because in the first line, it types each character individually. You may need to do this to check your JavaScript, but often you don't.