【问题标题】:Is there a way by which I can append time stamp to the generated reports in Newman?有没有办法可以将时间戳附加到 Newman 中生成的报告中?
【发布时间】:2017-10-19 06:39:28
【问题描述】:

有没有一种方法可以将时间戳附加到 Newman 中生成的报告中?截至目前,每次我们都需要更改报告名称以生成唯一报告。

【问题讨论】:

    标签: postman newman


    【解决方案1】:

    当我运行 newman 并告诉它生成一个 html 报告时:

    newman run "Login test.postman_test_run.json" --reporters html
    

    我运行了两次,它生成了两个名为:

    newman-run-report-2017-05-19-18-48-23-021-0.html
    newman-run-report-2017-05-19-18-50-43-702-0.html
    

    也许你有一个旧版本的 Newman(我使用的是 newman@3.6.0)。

    如果是旧版本,请更新

    npm install newman --global
    

    【讨论】:

    • 感谢您的回复。我使用的是不同的命令“set HTTP_PROXY=proxy & newman run collec.json -e environmentVariable.json --reporters cli,html --reporter-html-export report1.html”,它刚刚生成了报告指定名称。
    猜你喜欢
    • 2020-02-01
    • 1970-01-01
    • 2010-09-24
    • 2019-07-07
    • 1970-01-01
    • 2021-09-09
    • 1970-01-01
    • 2019-12-22
    • 1970-01-01
    相关资源
    最近更新 更多