【问题标题】:Save jasmin spec report to variable or file将 jasmin 规范报告保存到变量或文件
【发布时间】:2017-04-13 08:53:59
【问题描述】:

如何将JASMIN-SPEC-REPORTER测试结果保存在变量或文件中,测试后会发送到slack?

【问题讨论】:

    标签: jasmine protractor jasmine-reporters


    【解决方案1】:

    来自https://github.com/bcaudan/jasmine-spec-reporter/tree/master/examples/protractor。将其添加到您的配置中:

    let SpecReporter = require('jasmine-spec-reporter').SpecReporter;
    
    exports.config = {
       // your config here ...
    
       onPrepare: function () {
         jasmine.getEnv().addReporter(new SpecReporter({
          spec: {
            displayStacktrace: true
      }
    }));
    }
    }
    

    或者您可以查看一个非常酷的记者:https://github.com/mlison/protractor-jasmine2-screenshot-reporter。它将占用屏幕短片并将您的测试结果生成为 html 文件。

    【讨论】:

    • 我有这份规范,但问题是:我如何将这份报告转发给 slack?目前,当我的测试通过或未通过时,我在松弛时收到相同的消息..
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-11-23
    • 2014-05-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多