美文网首页
Postman终端命令执行脚本

Postman终端命令执行脚本

作者: 猿二胖 | 来源:发表于2019-11-08 10:37 被阅读0次
    一、生成脚本
    1、导出测试集合
    • 选中集合->右键->选中Export


      截屏2019-11-0810.28.04.png

    注:如上仅仅是导出的集合请求以及pre-script与test,并不包含globals和environment

    2、导出全局环境变量
    • 选中设置⚙️按钮->点击globals


      截屏2019-11-0810.25.50.png
    • 点击Download as JSON


      截屏2019-11-0810.26.33.png
    二、执行脚本
    $ newman run 测试脚本 -d 测试数据  -g 全局变量 -r html --reporter-html-export 导出的目录
    

    相关文章

      网友评论

          本文标题:Postman终端命令执行脚本

          本文链接:https://www.haomeiwen.com/subject/keribctx.html