如何更改代码接收phpbrowser / mink超时 [英] How to change codeception phpbrowser/mink timeout
问题描述
我正在尝试使用代码接收创建测试,以在高负载的情况下检查页面是否正常工作。
不幸的是,如果页面非常高加载并开始测试,我得到了这样的错误:
[..]
[Codeception\Exception\ModuleConfig ]
Codeception\Util\Mink模块未配置!
此驱动程序无法访问提供的URL。[curl] 28:操作在30031
毫秒后超时,接收到-1个字节中的0个[url] http://xxxx.xxx/app_db2 .php
[..]
是否有可能将Mink超时设置为更高的值?
您可以通过测试服配置来设置curl选项,就像在 在您的情况下,您需要CURLOPT_TIMEOUT,请参见 curl_setopt参考 I'm trying to create test with codeception that will check's the page is properly working in case of high load. Unfortunately if the page is in very very high load and the tests starts I got such error: Is there any possibility to set the Mink timeout to some higher value ? You can set curl options via your test suit configuration just like in example in Codeception docs. In your case you need CURLOPT_TIMEOUT, see curl_setopt reference
这篇关于如何更改代码接收phpbrowser / mink超时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
模块:
启用:[PhpBrowser]
config:
PhpBrowser:
url:'http :// localhost'
curl:
CURLOPT_TIMEOUT:50000#以秒为单位的超时
[..]
[Codeception\Exception\ModuleConfig]
Codeception\Util\Mink module is not configured!
Provided URL can't be accessed by this driver.[curl] 28: Operation timed out after 30031
milliseconds with 0 out of -1 bytes received [url] http://xxxx.xxx/app_db2.php
[..]
modules:
enabled: [PhpBrowser]
config:
PhpBrowser:
url: 'http://localhost'
curl:
CURLOPT_TIMEOUT: 50000 # timeout in seconds