码迷,mamicode.com
首页 > 其他好文 > 详细

jasmine-reporters

时间:2015-05-11 21:38:49      阅读:120      评论:0      收藏:0      [点我收藏+]

标签:

/**
 * Created by Administrator on 2015/4/24.
 */
exports.config = {
    directConnect: true,
    framework: "jasmine2",
    // Capabilities to be passed to the webdriver instance.
    capabilities: {
        ‘browserName‘: ‘chrome‘
    },

    // Spec patterns are relative to the current working directly when
    // protractor is called.
    specs: [
        ‘test.js‘
    ],
    onPrepare:function(){

        require(‘./locator/locatorExtend.js‘)(protractor);
        var jasmineReporters = require(‘jasmine-reporters‘);
        var reporter = new jasmineReporters.JUnitXmlReporter({
            consolidateAll: true,
            filePrefix: ‘output‘,
            savePath: ‘e2eOutput‘
        });
        jasmine.getEnv().addReporter(reporter);
    },
    // Options to be passed to Jasmine-node.
    jasmineNodeOpts: {
        showColors: true,
        defaultTimeoutInterval: 30000
    }
};

  

ps:jasmine一定要用2.0.0

npm install --save-dev jasmine-reporters@^2.0.0

把上面的依赖包下载到项目下面
framework: "jasmine2",
onPrepare: function() {
    var jasmineReporters = require(‘jasmine-reporters‘);
    jasmine.getEnv().addReporter(new jasmineReporters.JUnitXmlReporter({
        consolidateAll: true,
        filePrefix: ‘xmloutput‘,
        savePath: ‘testresults‘
    }));
}

  

jasmine-reporters

标签:

原文地址:http://www.cnblogs.com/lihaozhou/p/4495632.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!