大佬教程收集整理的这篇文章主要介绍了requestTimeout 和 responseTimeout 的上限是 240 秒吗?,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
问题
requestTimeout 和 responseTimeout 的上限是 240s 吗?
当我将它们设置为 300 秒时,屏幕上没有返回任何响应。这是为什么?
我做了什么(1)
设置 requestTimeout 和 responseTimeout 为 240s 并等待响应。
cy.server();
cy.route("post",API).as('postAPI');
// Set the timeout (4 minutes)
Cypress.config('requestTimeout',240000);
Cypress.config('responseTimeout',240000);
// This is where the POST API will be executed.
cy.get(SELEctors.submitBtn).click();
// Wait for API response. Response time is more than 4 minutes.
cy.wait('@postAPI');
结果(1)
Cypress 因 4 分钟后超时而终止。
它按预期工作。
我做了什么(2)
为 requestTimeout 和 responseTimeout 设置 300s 并等待响应。
cy.server();
cy.route("post",API).as('postAPI');
// Set the timeout (5 minutes)
Cypress.config('requestTimeout',300000);
Cypress.config('responseTimeout',300000);
// This is where the POST API will be executed.
cy.get(SELEctors.submitBtn).click();
// Wait for API response. Response time is more than 5 minutes.
cy.wait('@postAPI');
结果(2)
5 分钟后不会发生超时。
服务器返回了一个响应。但是在 cypress 屏幕上没有返回任何响应。
我原以为五分钟后会发生超时。
如果超时没有发生,我希望在屏幕上收到响应,但我没有收到响应
我想知道cypress的规格,以减少研究等的时间
如果您对此有所了解,请告诉我。
非常感谢。
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)
以上是大佬教程为你收集整理的requestTimeout 和 responseTimeout 的上限是 240 秒吗?全部内容,希望文章能够帮你解决requestTimeout 和 responseTimeout 的上限是 240 秒吗?所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。