首页 > 解决方案 > 在 GitLab 的 docker 上运行邮递员脚本时出现 2 个错误。相同的脚本通过 Postman 和 Newman 运行良好

问题描述

尝试在 GitLab 的 docker 上运行我的邮递员脚本 (collection.json) 时,我遇到了两个错误,如随附的屏幕截图所示。以下是有关我的系统设置的详细信息:

1. Newman Version: 4.1.0
2. OS details: Windows 7, 64 bit
3. Expected behaviour: I should get the Status code as 200 and my assertion should pass.
4. Command/script used to run Newman: newman run Generate_Access_Token.postman_collection.json --reporters cli, html --reporter-html-export report.html
I'm getting two errors as shown in the attached screenshot while trying to run my postman script (collection.json) on a docker in GitLab

标签: gitlabpostmannewman

解决方案


通过在我的运行语句末尾添加 --insecure 它对我有用。新语句如下所示:

  • 新人运行 Generate_Access_Token.postman_collection.json --reporters cli, html --reporter-html-export report.html --insecure

推荐阅读