protractor-html-screenshot-reporter
Version:
An npm module and grunt plugin which generates your Protractor test reports in HTML with screenshots
50 lines (42 loc) • 1.08 kB
JavaScript
module.exports = function(grunt) {
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
shell: {
options: {
stdout: true
},
selenium: {
command: './selenium/start',
options: {
stdout: false,
async: true
}
},
protractor_install: {
command: 'node ./node_modules/protractor/bin/webdriver-manager update'
},
npm_install: {
command: 'npm install'
}
},
protractor: {
options: {
keepAlive: true,
configFile: "protractor.conf.js"
},
singlerun: {},
auto: {
keepAlive: true,
options: {
args: {
seleniumPort: 4444
}
}
}
}
});
grunt.registerTask('test:e2e', ['protractor:singlerun']);
grunt.registerTask('install', ['update','shell:protractor_install']);
grunt.registerTask('update', ['shell:npm_install']);
};