【问题标题】:Testcafe test fails because "Failed to find a DNS-record for the resource" with VPN, but without VPN it works [closed]Testcafe 测试失败,因为“无法找到资源的 DNS 记录”使用 VPN,但没有 VPN 它可以工作 [关闭]
【发布时间】:2020-02-13 05:42:39
【问题描述】:

当我通过 VPN 连接时测试失败,但没有它可以正常工作。它执行对该 URL 的点击: https://www.google.com/search?q=let+me+google+that+for+you

我尝试使用 --proxy-bypass 设置,但我想我做得不对,有什么关于它应该是什么样子的指导吗?

【问题讨论】:

  • 你在使用跑步者课程吗?
  • 不,CLI 命令。

标签: testing dns vpn e2e-testing testcafe


【解决方案1】:

VPN 不应影响您的测试。从症状来看,您使用的似乎是代理,而不是 VPN。如果为真,则应使用--proxy 选项指定代理服务器地址,如下所述here

--proxy <host>

指定本地网络中用于访问 Internet 的代理服务器。

testcafe chrome my-tests/**/*.js --proxy proxy.corp.mycompany.com
testcafe chrome my-tests/**/*.js --proxy 172.0.10.10:8080

您还可以使用代理主机指定身份验证凭据。

testcafe chrome my-tests/**/*.js --proxy username:password@proxy.mycorp.com

至于--proxy-bypass 选项,其含义相反。您可以使用它来指定未代理的资源,例如,托管在本地网络内的资源。

【讨论】:

  • 你说的完全正确,我按照你说的做了!代理选项,然后绕过我本地网络中托管的那些!
猜你喜欢
  • 2020-04-24
  • 2019-09-12
  • 2012-02-22
  • 2017-11-05
  • 2010-09-19
  • 1970-01-01
  • 2021-07-22
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多