惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

N
Netflix TechBlog - Medium
V
Vulnerabilities – Threatpost
Google Online Security Blog
Google Online Security Blog
Hugging Face - Blog
Hugging Face - Blog
L
LINUX DO - 热门话题
云风的 BLOG
云风的 BLOG
P
Proofpoint News Feed
D
Docker
C
Cyber Attacks, Cyber Crime and Cyber Security
MyScale Blog
MyScale Blog
P
Palo Alto Networks Blog
T
Tenable Blog
P
Privacy International News Feed
Google DeepMind News
Google DeepMind News
小众软件
小众软件
Cisco Talos Blog
Cisco Talos Blog
aimingoo的专栏
aimingoo的专栏
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
A
Arctic Wolf
C
Cybersecurity and Infrastructure Security Agency CISA
C
Cisco Blogs
T
Threat Research - Cisco Blogs
NISL@THU
NISL@THU
The Hacker News
The Hacker News
Project Zero
Project Zero
AWS News Blog
AWS News Blog
Simon Willison's Weblog
Simon Willison's Weblog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
T
Threatpost
V
Visual Studio Blog
The GitHub Blog
The GitHub Blog
The Cloudflare Blog
Last Week in AI
Last Week in AI
Jina AI
Jina AI
Cyberwarzone
Cyberwarzone
The Register - Security
The Register - Security
C
CXSECURITY Database RSS Feed - CXSecurity.com
Vercel News
Vercel News
D
Darknet – Hacking Tools, Hacker News & Cyber Security
MongoDB | Blog
MongoDB | Blog
U
Unit 42
Scott Helme
Scott Helme
A
About on SuperTechFans
WordPress大学
WordPress大学
F
Fortinet All Blogs
大猫的无限游戏
大猫的无限游戏
G
GRAHAM CLULEY
Latest news
Latest news
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
S
Schneier on Security

Linux - 分类 - cywhat's blog

Linux生成自定义名称的ssh证书 Jmeter进行分布式压测 Jenkins端口修改之后没有生效 Jenkins添加html报告并发送到邮箱 Jenkins插件无法安装解决 Jenkins报错 Bash:newman:command Not Found Linux配置时间同步 如何保持Ssh长时间连接不断开 Raid磁盘阵列
Linux安装newman生成postman脚本报告
cywhat · 2022-11-10 · via Linux - 分类 - cywhat's blog

   约 406 字  预计阅读 1 分钟    次阅读     条评论

目录

1、安装node

1
2
3
4
5
6
7
8
# 1、下载node
wget https://nodejs.org/dist/v16.9.1/node-v16.9.1-linux-x64.tar.xz 

# 2、解压
tar -xvf node-v16.9.1-linux-x64.tar.xz

# 3.重命名
mv node-v16.9.1-linux-x64 node

2、配置环境变量

1
2
3
4
5
6
7
8
9
# 1、编辑环境变量文件
vim /etc/profile

# 2、添加node环境
export NODE_HOME=/usr/local/node
export PATH=$NODE_HOME/bin:$PATH  #放在后面

# 3、让配置生效
source /etc/profile

3、检查node是否安装完成

4、安装newman

1
npm install -g newman  #全局安装

5、安装newman-html插件

1
npm install -g newman-reporter-htmlextra --registry=https://registry.npm.taobao.org

6、命令详解

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
newman run  A.postman_collection.json  -e B.postman_environment.json  -r htmlextra,cli,junit --reporter-junit-export ../reports/echo.xml   --reporter-htmlextra-title "接口自动化测试报告" --reporter-htmlextra-browserTitle "测试报告" --reporter-htmlextra-template ./template.hbs --reporter-htmlextra-export ./reports/C.html

A.postman_collection.json           #postman的脚本集合
B.postman_environment.json          #postman的环境变量
-r htmlextra,cli,junit              #指定插件htmlextra和junit
--reporter-junit-export             #生成junit报告
../reports/echo.xml                 #生成的junit报告-用xml格式呈现
--reporter-htmlextra-title          #定义报告的title名称
--reporter-htmlextra-browserTitle   #定义浏览器title名称
--reporter-htmlextra-template       #生成报告的模板
./template.hbs                      #使用的模板路径
--reporter-htmlextra-export         #用htmlextra导出报告
./reports/C.html                    #生成到当前目录的reports并命名为C.html

关注一下再走吧

公众号 小程序

赞赏支持

微信打赏 支付宝打赏