postman(八):使用newman来执行postman脚本




[root@localhost bin]# newman run -h
Usage: run <collection> [options] URL or path to a Postman Collection. Options:
-e, --environment <path> Specify a URL or Path to a Postman Environment.
-g, --globals <path> Specify a URL or Path to a file containing Postman Globals.
--folder <path> Specify folder to run from a collection. Can be specified multiple times to run multiple folders (default: [])
-r, --reporters [reporters] Specify the reporters to use for this run. (default: ["cli"])
-n, --iteration-count <n> Define the number of iterations to run.
-d, --iteration-data <path> Specify a data file to use for iterations (either json or csv).
--export-environment <path> Exports the environment to a file after completing the run.
--export-globals <path> Specify an output file to dump Globals before exiting.
--export-collection <path> Specify an output file to save the executed collection
--postman-api-key <apiKey> API Key used to load the resources from the Postman API.
--delay-request [n] Specify the extent of delay between requests (milliseconds) (default: )
--bail [modifiers] Specify whether or not to gracefully stop a collection run on encountering an errorand whether to end the run with an error based on the optional modifier.
-x , --suppress-exit-code Specify whether or not to override the default exit code for the current run.
--silent Prevents newman from showing output to CLI.
--disable-unicode Forces unicode compliant symbols to be replaced by their plain text equivalents
--global-var <value> Allows the specification of global variables via the command line, in a key=value format (default: [])
--color <value> Enable/Disable colored output. (auto|on|off) (default: "auto")
--timeout [n] Specify a timeout for collection run (in milliseconds) (default: )
--timeout-request [n] Specify a timeout for requests (in milliseconds). (default: )
--timeout-script [n] Specify a timeout for script (in milliseconds). (default: )
--ignore-redirects If present, Newman will not follow HTTP Redirects.
-k, --insecure Disables SSL validations.
--ssl-client-cert <path> Specify the path to the Client SSL certificate. Supports .cert and .pfx files.
--ssl-client-key <path> Specify the path to the Client SSL key (not needed for .pfx files)
--ssl-client-passphrase <path> Specify the Client SSL passphrase (optional, needed for passphrase protected keys).
-h, --help output usage information <collection>是指单个请求或者从postman导出的集合文件(也就是json格式的脚本)
options是一些组合参数,介绍下我用到的几个参数
() -e 指定环境变量,把在postman中设置的环境变量导出,然后再把路径填写到这里即可
() -g 指定全局变量,把在postman中设置的全局变量导出,然后再把路径填写到这里即可
() -n 指定迭代次数,即运行n次脚本
() --timeout-request 指定请求的超时时间
() -r 指定运行报告的格式,可以为json格式、html格式,默认为cli格式,即在命令行展示运行结果



postman(八):使用newman来执行postman脚本的更多相关文章
- postman—使用newman来执行postman脚本
我们知道postman是基于javascript语言编写的,而导出的json格式的postman脚本也无法直接在服务器运行,它需要在newman中执行(可以把newman看做postman脚本的运行环 ...
- Android系统Recovery工作原理之使用update.zip升级过程分析(八)---解析并执行升级脚本updater-script【转】
本文转载自:http://blog.csdn.net/mu0206mu/article/details/7465551 Android系统Recovery工作原理之使用update.zip升级过程分 ...
- 第七篇 Postman+Node.js+Newman+Jenkins实现自动化测试
今天终于不咋忙了,学习整理一下一直想做却没实现的事儿,这事已经折磨团队半年之久了.因为项目是B端业务的测试,测试过程中需要生产大量的测试数据,而且都是跨多个系统的测试,对于后置流程的测试,这些同学往往 ...
- postman用法总结+newman持续集成
一.postman 1.GET 请求:点击Params,输入参数及value,可输入多个显示在URL链接上(GET请求的请求头与请求参数如在接口文档中无特别声明时可以不填) 2.POST请求:在bod ...
- postman(一)批量执行接口测试用例
postman(一)批量执行接口测试用例 学习了:https://blog.csdn.net/github_36032947/article/details/78611405 还可以把collecti ...
- Postman+Postman interceptor的安装和使用-解决把chrome浏览器登录状态同步到postman进行有依赖的接口测试 Postman 使用方法详解
Postman+Postman interceptor的安装和使用-解决把chrome浏览器登录状态同步到postman进行有依赖的接口测试 问题引入:做接口测试时,有依赖关系的接口往往不好测试( ...
- 【转】linux 定时执行shell脚本
在oracle 中可以利用dbms_job包定时执行pl/sql.sql过程,在像备份等需要在操作系统级定时任务只能采用crontab来完成 本文讲述crontab具体用法,以供备忘. 在oracle ...
- AngularJs中,如何在render完成之后,执行Js脚本
AngularJs是Google开源的前端JS框架.使用AngularJs, 我们能够容易地.健壮的开发出类似于Gmail一样的单页Web应用.AngularJs这个新兴的MVC前端框架,具有以下特点 ...
- crontab不执行perl脚本分析
在新装的Linux服务器上部署了一个作业监控磁盘空间并提前告警,在shell脚本里面调用了一个perl脚本发送告警邮件.结果出现了一个很奇怪的现象:如果手工执行该脚本/home/oracle/scri ...
随机推荐
- PHP 标准规范,PSR-1,PSR-2,PSR-3,PSR-4,PSR-5,PSR-6,PSR-7及其他标准
官方网站:https://psr.phphub.org/ 这里还有其他很多规范,但是很多都是英文. github:https://github.com/summerblue/psr.phphub.or ...
- ubuntu 16.04 安装和配置vncserver
https://www.linode.com/docs/applications/remote-desktop/install-vnc-on-ubuntu-16-04/#connect-to-vnc- ...
- ConnectionAbortedError: [WinError 10053] 你的主机中的软件中止了一个已建立的连接
Traceback (most recent call last): File "C:\Users\Administrator\AppData\Local\Programs\Python\P ...
- Windows路由表
对于路由器的路由表,网管都很熟悉,但是windows的路由表,可能了解的人就相对少一些.今天我们就一起来看看windows路由表. 一.windows路由表 1.使用命令 route print 查看 ...
- Spark Streaming之窗口函数和状态转换函数
流处理主要有3种应用场景:无状态操作.window操作.状态操作. reduceByKeyAndWindow import kafka.serializer.StringDecoder import ...
- openshift 容器云从入门到崩溃之五《部署应用》
1.配置部署模板 配置好用户权限之后就可以部署应用了oc常用的两种部署方式: Deploy Image方式 优点:这种方式是最简单的部署方式,你只需要有一个容器镜像就行了或者公开的docker hub ...
- awk 同时指定多个分隔符
$ echo "id: xxx(6667)xxx"|awk -F "[()]" '{print $2}' $ 6667 $ echo "abc[def ...
- idea快捷键使用
idea eclipse project workspace module ...
- Hbase 系统架构(zhuan)
一.系统架构 客户端连接hbase依赖于zookeeper,hbase存储依赖于hadoop client: 1.包含访问 hbase 的接口, client 维护着一些 cache(缓存) 来加快对 ...
- https://scrapingclub.com/exercise/basic_login/
遇到的问题:csrftoken cfduid 是在request.headers里面的,一直在找怎么在scrapy里get request.header,从scrapy shell ,then fet ...