• <tfoot id='NNVO5'></tfoot>
    <legend id='NNVO5'><style id='NNVO5'><dir id='NNVO5'><q id='NNVO5'></q></dir></style></legend>
      <i id='NNVO5'><tr id='NNVO5'><dt id='NNVO5'><q id='NNVO5'><span id='NNVO5'><b id='NNVO5'><form id='NNVO5'><ins id='NNVO5'></ins><ul id='NNVO5'></ul><sub id='NNVO5'></sub></form><legend id='NNVO5'></legend><bdo id='NNVO5'><pre id='NNVO5'><center id='NNVO5'></center></pre></bdo></b><th id='NNVO5'></th></span></q></dt></tr></i><div id='NNVO5'><tfoot id='NNVO5'></tfoot><dl id='NNVO5'><fieldset id='NNVO5'></fieldset></dl></div>
        • <bdo id='NNVO5'></bdo><ul id='NNVO5'></ul>

        <small id='NNVO5'></small><noframes id='NNVO5'>

        如何在 CI 环境中运行 postman 的 newman?

        How do I run postman#39;s newman in CI environment?(如何在 CI 环境中运行 postman 的 newman?)

          • <bdo id='vryhG'></bdo><ul id='vryhG'></ul>
          • <tfoot id='vryhG'></tfoot>

            1. <legend id='vryhG'><style id='vryhG'><dir id='vryhG'><q id='vryhG'></q></dir></style></legend>

                <tbody id='vryhG'></tbody>
                  <i id='vryhG'><tr id='vryhG'><dt id='vryhG'><q id='vryhG'><span id='vryhG'><b id='vryhG'><form id='vryhG'><ins id='vryhG'></ins><ul id='vryhG'></ul><sub id='vryhG'></sub></form><legend id='vryhG'></legend><bdo id='vryhG'><pre id='vryhG'><center id='vryhG'></center></pre></bdo></b><th id='vryhG'></th></span></q></dt></tr></i><div id='vryhG'><tfoot id='vryhG'></tfoot><dl id='vryhG'><fieldset id='vryhG'></fieldset></dl></div>
                1. <small id='vryhG'></small><noframes id='vryhG'>

                  本文介绍了如何在 CI 环境中运行 postman 的 newman?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我想在我的 CI 环境 (solano-ci) 上运行 newman.

                  I'd like to run newman on my CI environment (solano-ci).

                  newman 是一个在邮递员集合中运行请求的工具.

                  newman is a tool that runs through requests in your postman collection.

                  我的 package.json 中有一个 newman 脚本,我还有一个 npm start 脚本,它在 处启动服务器>localhost:3000.

                  I have a newman script in my package.json, and I also have a npm start script that starts the server at localhost:3000.

                  newman 已经配置了环境变量来测试端口 localhost:3000 上的端点.

                  newman is already configured with environment variables to test endpoints on port localhost:3000.

                  问题是我需要一个脚本来启动服务器 (npm start),然后运行 npm run newman.但是在服务器可用和 newman 运行它的测试之间存在延迟.如果 newman 在服务器可用之前运行,则每次测试都会出错.

                  The issue is I need one script that starts the server (npm start) and then runs npm run newman. But there's a delay between when the server is available and when newman runs it's tests. If newman runs before the server is available it results in an error for each test.

                  Error: connect ECONNREFUSED 127.0.0.1:3000
                  

                  现在这是我尝试使用 run-p 用于并行启动两个进程.然后我必须使用 sleep 并设置任意数量的等待时间以确保服务器准备就绪.

                  Right now here's what I tried using run-p which works at starting two processes in parallel. Then I have to use sleep and set an arbitrary number of time the wait to ensure that the server is ready.

                  "newman": "newman -c ./postman/api.postman_collection.json -e ./postman/local.postman_environment.json",
                  "newman-sleep": "sleep 10 && npm run newman",
                  "newman-server": "run-p start newman-sleep"
                  

                  推荐答案

                  你可以使用 wait-on 包.

                  npm install --save-dev wait-on
                  

                  那么,

                  "newman-sleep": "wait-on http://localhost:3000 && npm run newman"
                  

                  这篇关于如何在 CI 环境中运行 postman 的 newman?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  在开发JS过程中,会经常遇到两个小数相运算的情况,但是运算结果却与预期不同,调试一下发现计算结果竟然有那么长一串尾巴。如下图所示: 产生原因: JavaScript对小数运算会先转成二进制,运算完毕再转回十进制,过程中会有丢失,不过不是所有的小数间运算会
                  问题描述: 在javascript中引用js代码,然后导致反斜杠丢失,发现字符串中的所有\信息丢失。比如在js中引用input type=text onkeyup=value=value.replace(/[^\d]/g,) ,结果导致正则表达式中的\丢失。 问题原因: 该字符串含有\,javascript对字符串进行了转
                  Rails/Javascript: How to inject rails variables into (very) simple javascript(Rails/Javascript:如何将 rails 变量注入(非常)简单的 javascript)
                  CoffeeScript always returns in anonymous function(CoffeeScript 总是以匿名函数返回)
                  Ordinals in words javascript(javascript中的序数)
                  getFullYear returns year before on first day of year(getFullYear 在一年的第一天返回前一年)

                    <tbody id='HJFfe'></tbody>
                2. <tfoot id='HJFfe'></tfoot>

                  <legend id='HJFfe'><style id='HJFfe'><dir id='HJFfe'><q id='HJFfe'></q></dir></style></legend>

                  • <bdo id='HJFfe'></bdo><ul id='HJFfe'></ul>

                          • <i id='HJFfe'><tr id='HJFfe'><dt id='HJFfe'><q id='HJFfe'><span id='HJFfe'><b id='HJFfe'><form id='HJFfe'><ins id='HJFfe'></ins><ul id='HJFfe'></ul><sub id='HJFfe'></sub></form><legend id='HJFfe'></legend><bdo id='HJFfe'><pre id='HJFfe'><center id='HJFfe'></center></pre></bdo></b><th id='HJFfe'></th></span></q></dt></tr></i><div id='HJFfe'><tfoot id='HJFfe'></tfoot><dl id='HJFfe'><fieldset id='HJFfe'></fieldset></dl></div>

                            <small id='HJFfe'></small><noframes id='HJFfe'>