【发布时间】:2014-02-04 05:14:23
【问题描述】:
我正在使用 CucumberJS 在我的 NodeJS Web 应用程序上运行测试。
目前,我可以通过执行 grunt 来运行我所有的 grunt 任务,或者使用 grunt cucumberjs 只运行 CucumberJS 任务。
但现在我只想执行特定的功能。
例如,假设我有以下功能文件:
- 登录功能
- Favorite.feature
我只想运行收藏功能测试,使用如下命令:
grunt cucumberjs Favourite
这可能吗?
顺便说一句,这是我的gruntfile.js:
'use strict';
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
...
cucumberjs: {
src: 'features',
options: {
steps: 'features/step_definitions',
format: 'pretty'
}
}
});
...
grunt.loadNpmTasks('grunt-cucumber');
grunt.registerTask('default', [... 'cucumberjs']);
};
【问题讨论】:
标签: node.js gruntjs cucumberjs