美文网首页Sonar
gitlab+newman实现自动化测试

gitlab+newman实现自动化测试

作者: 无处安放的躁动 | 来源:发表于2019-07-23 15:09 被阅读0次

前言

分析

通过postman+newman

使用

npm install -g newman
npm install -g newman-reporter-html
newman run examples/sample-collection.json
newman run examples/sample-collection.json -r html
# 生产报告在当前的目录下的newman内

结果截图

生成的报告

易错点

安装newman-reporter-html错误

[root@test2 sendEmail]# newman run scripts/web.postman_collection.json  -r html
newman: "html" reporter could not be loaded.
  run `npm install newman-reporter-html`

[root@test2 sendEmail]# npm install newman-reporter-html
npm WARN saveError ENOENT: no such file or directory, open '/SHELL/autoTest/sendEmail/package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open '/SHELL/autoTest/sendEmail/package.json'
npm WARN newman-reporter-html@1.0.3 requires a peer of newman@4 but none is installed. You must install peer dependencies yourself.
npm WARN sendEmail No description
npm WARN sendEmail No repository field.
npm WARN sendEmail No README data
npm WARN sendEmail No license field.

+ newman-reporter-html@1.0.3
added 13 packages from 45 contributors and audited 14 packages in 1.615s
found 1 high severity vulnerability
  run `npm audit fix` to fix them, or `npm audit` for details
[root@test2 sendEmail]# npm audit fix
npm ERR! code EAUDITNOPJSON
npm ERR! audit No package.json found: Cannot audit a project without a package.json

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2019-07-18T08_27_23_701Z-debug.log

  • 问题截图


    生产报告安装newman-reporter-html报错
  • 解决办法

npm install -g newman-reporter-html

参考文档

参考文档

相关文章

  • gitlab+newman实现自动化测试

    前言 分析 通过postman+newman 使用 结果截图 易错点 安装newman-reporter-html...

  • APP自动化测试的用例设计与实现

    一 手工测试用例与自动化测试用例的对比 二自动化测试用例的实现 =========================...

  • 自动化测试原理

    自动化测试的实现原理,针对不同的类型(静态测试和动态测试)来区别对待。动态测试的自动化实现主要通过特定的程序来模拟...

  • 自动化测试一些问题

    1. 什么是自动化测试? 自动化测试,顾名思义,自动完成测试工作。 通过一些自动化测试工具或自己造轮子实现模...

  • selenium自动化框架前的准备

    自动化测试是以人为驱动工具执行测试的过程。而自动化测试框架是让自动化测试实现的一系列组合封装的库或工具,来帮助我们...

  • 自动化测试效率提升方案

    自动化测试效率提升方案 本文注重自动化测试用例并行方案的设计,忽略了具体代码实现的细节。代码实现细节大家利用网络资...

  • Soapui接口功能测试参数化

    按照自动化测试分层实现的原理,每一层的脚本实现都要进行参数化,自动化的目标就是要实现脚本代码与测试数据分离。 当测...

  • 基于Python实现简单的接口自动化

    为什么要用Python实现接口自动化? 使用requests+unittest很容易实现接口自动化测试,而且req...

  • 自动化测试实现优劣

    目前互联网测试中,几乎所有团队、所有测试人员都在做自动化测试。但要评价自动化测试实现的优劣,就需要拿具体的数据来说...

  • 自动化测试框架de详细搭建

    [ 自动化测试 ](javascript:;)框架结构说明目前实现的自动化测试框架大致可以分为以下四块内容: 页面...

网友评论

    本文标题:gitlab+newman实现自动化测试

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