Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
598 views
in Technique[技术] by (71.8m points)

angularjs - Protractor - run multiple tests in parallel on different browsers

I can't find any information on how to set this up, but it seems like a pretty basic concept, so I'm sure there's an answer out there.

I know how to run protractor on different browsers by setting the browserName property of the capabilities object in the config. And that's working great. I can set it to 'chrome' or 'firefox' or whatever I need and it runs just as expected. But the only way to run a single test suite against multiple browsers (as far as I know) is to create separate config files, each with a different browserName and then run each browser with its own config. This works, but its really slow because tests are then running in sequence, rather than concurrently.

Is there any way to run it on multiple browsers in parallel?

Can it be done on SauceLabs? or even using a local Selenium-Grid?

We are just trying to streamline our testing process and this would be a huge help. Any suggestions or info would be greatly appreciated. Thanks in advance.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

There's new option called multiCapabilities for that:

multiCapabilities: [{
  'browserName': 'chrome'
}, {
  'browserName': 'firefox'
}],

Here's a complete example.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...