【发布时间】:2018-03-11 14:36:13
【问题描述】:
我使用“newman”在 Jenkins 服务器上运行 API 测试。这对我来说很容易,我在“Postman”中编写测试脚本并在“newman”中运行我的收藏,但我无法为我的经理提供好的报告。我找到了“魅力报告”,我喜欢它。如果我使用“纽曼”,是否有机会创建魅力报告。 allure 支持 newman 吗?
【问题讨论】:
标签: rest report postman allure newman
我使用“newman”在 Jenkins 服务器上运行 API 测试。这对我来说很容易,我在“Postman”中编写测试脚本并在“newman”中运行我的收藏,但我无法为我的经理提供好的报告。我找到了“魅力报告”,我喜欢它。如果我使用“纽曼”,是否有机会创建魅力报告。 allure 支持 newman 吗?
【问题讨论】:
标签: rest report postman allure newman
看起来不行,这不可能。
为什么现在(在编写测试之后)您正在寻找报告工具?当 qa 团队分析测试工具可用于自动化时,它的活动发生在启动自动化过程中。
我查看了https://github.com/postmanlabs/newman 并认为您可以尝试将命令行输出解析为文本文件吗?并使用此输出为经理生成简单报告。
【讨论】:
是的,你可以。请按照以下步骤操作:
we can generate nice and clean report using Allure-js framework.
1. Installation
$ npm install -g newman-reporter-allure
2. Run the newman cli command to generate Allure results, specify allure in Newman's -r or --reporters option.
$ newman run <Collection> -e <Environment> -r allure
3. Allure results will be generated under folder "allure-results" in the root location. Use allure-commandline to serve the report locally.
$ allure serve
4. To generate the static report web-application folder using allure-commandline
$ allure generate --clean
Report will be generated under folder "allure-report" in the root location
.
【讨论】:
尝试使用我的repository,这是一个棘手的解决方案,它涵盖了所有内容:
并添加更多内容:
最后,您将获得 2 份报告:
【讨论】: