2017-04-03 34 views
0

我試圖增加Codeception REST超時,但它似乎並沒有工作。Codeception REST超時問題

這就是我

class_name: ApiTester 
modules: 
    enabled: 
     - \Helper\Api: 
     - REST: 
      depends: PhpBrowser 
      timeout: 90 

超時錯誤我得到

[GuzzleHttp \異常\的ConnectException]捲曲錯誤28:操作超時後30001毫秒0字節收到

我究竟做錯了什麼?

回答

1

我也有這個問題。這是我修復

在acceptance.suite.yml

# Codeception Test Suite Configuration 

# suite for acceptance tests. 
# perform tests in browser using the WebDriver or PhpBrowser. 
# If you need both WebDriver and PHPBrowser tests - create a separate suite. 

class_name: AcceptanceTester 
modules: 
    enabled: 
     - PhpBrowser 
     - REST 
    config: 
     REST: 
      timeout: 90 # or 90000 the same result 
     PhpBrowser: 
      url: 'http://YOUR_URL_TO_YOUR_PUBLIC_FOLDER/public' 
      curl: 
       CURLOPT_TIMEOUT: 300 // in Seconds 

我的問題是,我只放了REST在它與「依賴」於PhpBrowser,但你需要配置PhpBrowser設置超時。

我希望我能幫助和抱歉,我的英語不好:)

親切的問候, 托馬斯Meejumlong

0

感謝托馬斯,我已經添加到了我的api.suite.yml文件和它的工作。

class_name: ApiTester modules: enabled: - \Helper\Api - REST - PhpBrowser config: REST: depends: PhpBrowser timeout: 90 PhpBrowser: url: '' curl: CURLOPT_TIMEOUT: 90

+0

刪除'超時:90'參數,它不會做任何事情。 REST模塊使用的唯一參數是「url」。 – Naktibalda