简体   繁体   中英

MSTest - Executing Tests Multiple Times

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

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).

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).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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