【发布时间】:2015-07-08 06:56:39
【问题描述】:
我正在尝试从这样的繁重任务中多次启动量角器
grunt.registerTask('makeapps', 'Create Apps', function(count) {
console.log('value of count is' + count);
var done=this.async();
for(var i=1 ;i <= count; i++)
{
grunt.initConfig({
protractor: {
options: {
configFile: "./createAppConf.js", // Default config file which includes protractor tests and other dependencies such as HTML protractor screenshot reporter
keepAlive: true, // If false, the grunt process stops when the test fails.
noColor: false, // If true, protractor will not use colors in its output.
args: {
// Arguments passed to the command
}
},
your_target: { // Grunt requires at least one target to run so you can simply put 'all: {}' here too.
options: {
configFile: "createAppConf.js", // // Default config file which includes protractor tests and other dependencies such as HTML protractor screenshot reporter
args: {} // Target-specific arguments
}
},
},
})
grunt.loadNpmTasks('grunt-protractor-runner');
}
done();
});
我这样运行任务
grunt makeapps:3 量角器
我只能启动量角器和测试一次。我无法多次启动它。谁能告诉我我做错了什么?
【问题讨论】:
标签: gruntjs protractor