如何更改代码接收phpbrowser / mink超时 [英] How to change codeception phpbrowser/mink timeout

查看:81
本文介绍了如何更改代码接收phpbrowser / mink超时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用代码接收创建测试,以在高负载的情况下检查页面是否正常工作。



不幸的是,如果页面非常高加载并开始测试,我得到了这样的错误:

  [..] 
[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参考

 模块:
启用:[PhpBrowser]
config:
PhpBrowser:
url:'http :// localhost'
curl:
CURLOPT_TIMEOUT:50000#以秒为单位的超时


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:

[..] 
[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
[..]

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

modules: 
    enabled: [PhpBrowser]  
      config:
        PhpBrowser:
          url: 'http://localhost' 
          curl:
            CURLOPT_TIMEOUT: 50000 # timeout in seconds

这篇关于如何更改代码接收phpbrowser / mink超时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆