MSTest - 多次执行测试

发布于 2024-07-13 14:25:34 字数 95 浏览 3 评论 0原文

我正在使用 MSTest 来驱动 Selenium,并且我想在同一次测试运行中针对多个浏览器执行测试。 有什么办法可以做到这一点吗?

谢谢, 内森

I'm using MSTest to drive Selenium, and I'd like to execute tests against multiple browsers in the same test run. Is there any way to do this?

Thanks,
Nathan

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

久夏青 2024-07-20 14:25:34

查看 DataSourceAttribute。 它能够根据数据源多次启动测试。 例如,我使用列出平台的 CSV 文件(在您的浏览器中)。

Take a look on DataSourceAttribute. It gives ability to start tests muliple times based on data source. For example I use CSV file that lists platforms (in your case browsers).

九厘米的零° 2024-07-20 14:25:34

内森,
不幸的是,我无法帮助 MSTest,但我确实对 Selenium 和并行执行了解很多(我是 RC 创始人之一,几年前创办了一家 Selenium-in-the-cloud 公司)。

一个问题:如果您计划在 Firefox、Safari 和 IE 下同时执行相同的测试,您是否考虑过可能存在由测试执行的工件引起的竞争条件? 例如,如果测试要创建新用户“bob”,则只有第一个测试会通过。

我是并行化的忠实粉丝,但它通常与状态管理和控制所述状态的固定装置齐头并进。 我很想知道您的情况如何,或者这些类型的问题是否对您的测试造成问题(它们的范围通常从“不是问题”到“严重问题”,具体取决于应用程序和测试)。

Nathan,
Unfortunately I can't help with MSTest, but I do know a lot about Selenium and parallel execution (I'm one of the RC founders and started a Selenium-in-the-cloud company a few years back).

One question: if you're planning to execute the same test at the same time under Firefox, Safari, and IE, have you considered that there may be race conditions caused by artifacts of the test execution? For example, if the test were to create a new user "bob", then only the first test would pass.

I'm a big fan of parallelization, but often it goes hand-in-hand with state management and solid fixtures that control said state. Would love to hear how it goes for you or if these types of issues are a problem for your tests (they often range from being "not a problem" to a "serious problem" depending on the app and the test).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文