2015-06-17 36 views
3

我正在測試Browserstack進行驗收測試。他們有一個特殊的習慣,需要很長時間來回應某些要求。我正在運行Codeception,並且總是收到CURL 30秒超時錯誤。我想能夠覆蓋此超時,但我無法弄清楚如何做到這一點。這在Codeception中甚至可能嗎?如何覆蓋Codeception的默認CURL超時 - 使用Browserstack

這是我的驗收測試YML:

class_name: RemoteAcceptanceTester 
modules: 
    enabled: 
    - WebDriver 
    config: 
    WebDriver: 
     url: '{my url}' 
     curl: 
     CURLOPT_TIMEOUT: 120 
     host: 'hub.browserstack.com' 
     port: 80 
     browser: firefox 
     capabilities: 
     'browserstack.user': '{user}' 
     'browserstack.key' : '{key}' 
     'browserVersion': '21.0' 
     'browserstack.debug': 'false' 
     'browserstack.local': 'true' # force use of local BrowserStackLocal binary 

是否有任何設置或任何黑客,我可以嘗試最多超時我想要的東西,這120秒?我知道這是一個荒謬的時間,但是當你運行本地二進制文件時Browserstack有點「奇特」。

+1

與PhpBrowser它應該工作。我用它來強制HTTP1.0而不是HTTP1.1.http://codeception.com/docs/modules/PhpBrowser – rickroyce

回答

-1

爲Codeception一個新版本上線

[webdriver的]新增webdriver的初始化設置connection_timeout和request_timeout通過@ n8whnp#2065

看到=>http://codeception.com/changelog

另請參閱文檔頁面

connection_timeout - 打開與遠程硒服務器的連接超時(默認爲30秒)。 request_timeout - 從遠程selenium服務器返回某個請求的請求超時(默認爲30秒)。

here =>http://codeception.com/docs/modules/WebDriver