You need to enable JavaScript to run this app. Report Portal无法接收Test Cafe测试结果问题排查咨询
优惠活动
大模型
产品
解决方案
定价
更多

Report Portal无法接收Test Cafe测试结果问题排查咨询

报错原因及修复方案

报错含义

你看到的Report Portal launch : function link() { [native code] }属于插件代码执行异常导致的非标准报错:当上报请求因参数错误/网络不通无法正常发送到Report Portal服务端时,插件在拼接调试日志时错误调用了JavaScript字符串原型的原生link()方法,直接将方法本身打印出来,本质是测试启动上报请求从未成功发送,因此Report Portal后台没有对应记录。

修复步骤

  1. 修正命令行基础拼写错误
    原命令存在两处笔误,直接导致TestCafe运行异常:
  • 路径//hone/wally/ 修正为 /home/wally/
  • 执行入口testscafe.js 修正为 testcafe.js,多余的s为笔误
  1. 修正上报参数格式
  • --rdomain参数去掉末尾的斜杠,改为--rdomain=http://reportportal.svcs.aws:8080,避免拼接接口路径时出现双斜杠导致请求404
  • 已追加的--rproject=wally_test为必填参数,保留即可
  1. 修正后的运行命令参考
/usr/bin/node /home/wally/testcafe/node_modules/testcafe.js chrome test.js --reporter=reportportal --rdomain=http://reportportal.svcs.aws:8080 --rtoken=xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx --rlaunch=wally_test --rproject=wally_test

额外校验项

  • 先在当前AWS Linux环境执行curl http://reportportal.svcs.aws:8080/api/v1,确认网络可达、服务端正常响应
  • 确认所用token属于wally_test项目,且拥有测试结果上报权限
  • 确认reportportal-testcafe-plugin与本地TestCafe版本兼容,推荐TestCafe ≥1.15.0,插件使用最新稳定版

内容的提问来源于stack exchange,提问作者Wally

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.10.10 18:27:03