最近在使用newman时,为了展示报告,使用了newman-reporter-allure插件,但在最后显示时,有乱码情况,如下:

newman allure-report中文乱码问题处理

 

 

postman文件是使用的是v2.1方式导出的,在每个接口中的name是用的中文,如下

newman allure-report中文乱码问题处理

 

 没办法,所以需要更改插件源码来适配中文,找到插件安装位置

使用命令:npm list -g --depth 0

找到newman-reporter-allure路径,找到index.js文件,最后几行

newman allure-report中文乱码问题处理

 

 原来作者这里特意将string做了处理,不明白具体的意思是何在。先修改如下,直接返回看看效果:

newman allure-report中文乱码问题处理

 

 很好。完美解决::::

newman allure-report中文乱码问题处理

 

相关文章:

  • 2021-08-02
  • 2022-12-23
  • 2021-07-06
  • 2021-09-18
  • 2021-08-04
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-05-12
  • 2021-06-02
  • 2022-12-23
  • 2022-12-23
  • 2021-07-14
  • 2022-01-07
  • 2022-12-23
相关资源
相似解决方案