gpt4 book ai didi

php - 如何更改 codeception phpbrowser/mink 超时

转载 作者:搜寻专家 更新时间:2023-10-31 21:34:43 27 4
gpt4 key购买 nike

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

不幸的是,如果页面负载非常非常高并且测试开始,我会收到这样的错误:

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

是否有可能将 Mink 超时设置为更高的值?

最佳答案

您可以像在 example 中一样通过测试服配置设置 curl 选项在 Codeception 文档中。

在您的情况下,您需要 CURLOPT_TIMEOUT,请参阅 curl_setopt reference

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

关于php - 如何更改 codeception phpbrowser/mink 超时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22757141/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com