2011-07-31 121 views
8

是否有可能一起運行硒瀏覽器的多個實例,並且每個人都將爲他們工作,這將增加速度?如何一起運行硒瀏覽器的多個實例

我可以運行一個像:

ISelenium selenium = new DefaultSelenium("localhost", 4444, "*chrome", "http://localhost/"); 
selenium.Start(); 

,但如何打開更多的人,並打開頁面的每一個裏面?

回答

1

檢查Selenium Grid

(..)停止等待時間,讓您的網站接受的結果建立!硒電網多臺計算機上透明地分配你的測試,這樣可以並行運行測試,(..),這將極大地在瀏覽器中加快網絡測試

入門它很容易(HTTP:/ /selenium-grid.seleniumhq.org/get_started.html)和演示網站也存在。

+0

THX你了。會嘗試這個! – senzacionale

+0

顯然,即使使用Grid:http:// stackoverflow,您也必須使用PUnit(對於NUnit,或者如果您使用其他框架,請使用不同的並行測試運行器)以使測試並行運行。 com/questions/212863/how-can-i-run-nunitselenium-grid-tests-in-parallel讓我知道如果你發現否則! – zcrar70

+0

另請參閱http://stackoverflow.com/questions/3313163/how-can-i-run-nunit-tests-in-parallel – zcrar70

0

你的情況:

ISelenium selenium1 = new DefaultSelenium("localhost", 4444, "*chrome", "http://localhost/"); 
selenium1.Start(); 
selenium1... 
ISelenium selenium2 = new DefaultSelenium("localhost", 4444, "*chrome", "http://localhost/"); 
selenium2.Start(); 
selenium2... 
相關問題