通过TestRail Cli工具将测试上传到TestRail时,会出现网络错误

发布于 2025-02-13 10:22:34 字数 191 浏览 0 评论 0原文

我遇到一个奇怪的问题。也许有人经历了同样的解决方案。当我尝试以XML文件格式上传我的测试仪测试以通过Testrail Cli工具进行测试,我遇到了此错误,说上传由于网络错误而失败,并且我需要确保我具有有效的网络连接。我确实有一个有效的网络连接,所以我看不到问题,所以我唯一的猜测是因为我正在使用VPN。如果是问题,是否有办法通过使用VPN来消除错误?

I experience a strange problem. Maybe someone has experienced the same and found solution. When I try to upload my testrail tests in xml file format to Testrail by the testrail cli tool I got this error saying upload failed due to network error and that I need to make sure I have a valid network connection. I do have a valid network connection so I can't see the problem, so my only guess is maybe it is because of the thing that I'm using VPN. If it is the problem is there a way to get rid of the error by still using VPN?

errormfrom terminal

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

苍景流年 2025-02-20 10:22:34

也遇到了这个。不使用VPN,整个连接都是本地的,因此VPN看起来可能不会起作用。

额外的详细信息:我昨天开始使用TRCLI上传。那天,我确实遇到了错误,但是IIRC涉及XML文件本身(代码的PARSE_JUNIT部分)。我希望这一点超出了今天的网络错误弹出的那一刻。不过,我可能是错的,因为代码中的代码在昨天和今天之间没有任何更改。

更新1:我正在通过插件进行搜索以了解在何处调用故障。
在“故障映射”部分中,日志线的存在为:

 connection_error="Upload to TestRail failed due to a network error. Please make sure you have a "
    "valid network connection then try again."

Connection_Error在TRCLI \ api \ api_client.py 中称为

更新2:
在我的情况下,打开冗长的详细信息。
我在https:// [...]/index.php?/api/v2/get_projects上看到了多个重试
然后,它诉诸连接错误。

通过Postman运行相同的终点会取得成功,因此似乎有必要对TRCLI脚本进行进一步的调查。

更新3:
在更新TRCLI并运行不安全作为测试之后,此处也建立了连接。连接错误表示SSL错误。

目前正在计划两项操作:

  1. 验证testrail证书,因此不再需要使用 - 保护命令。
  2. 将TestRail更新为最新版本(对于随后的API错误)

Running into this as well. Not using a VPN and the whole connection is local, so it looks like VPN might not play a role.

Extra details: I started working with the TRcli upload yesterday. On that day I did get errors but iirc those involved the xml file itself (parse_junit section of the code). I expect that point to have been beyond the moment where this network error is popping up today. I can be wrong though, since nothing in the code changed between yesterday and today.

Update 1: I am searching through the plugin to understand where the fault is called.
In the faultmapping section, the logline exists as:

 connection_error="Upload to TestRail failed due to a network error. Please make sure you have a "
    "valid network connection then try again."

connection_error is called in trcli\api\api_client.py

Update 2:
Turning on verbose gives more details in my case of this problem.
I see multiple retries on https://[...]/index.php?/api/v2/get_projects
Then it resorts to the connection error.

Running that same endpoint through postman results in a success, so further investigation with the trcli scripts seems necessary.

Update 3:
After updating TRCLI and running insecure as test, the connection also established here. Connection error indicates an SSL error.

Two courses of actions are currently planned:

  1. Verify Testrail certificate so the --insecure command is no longer necessary.
  2. Update Testrail to latest version (for an api error that followed up)
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文