Skip to content

Instantly share code, notes, and snippets.

@AlphaGit
Created August 8, 2015 05:30
Show Gist options
  • Save AlphaGit/176a7eede22fd1e5a77c to your computer and use it in GitHub Desktop.
Save AlphaGit/176a7eede22fd1e5a77c to your computer and use it in GitHub Desktop.
Configuring Protractor to run
'use strict';
module.exports = function(grunt) {
grunt.initConfig({
connect: {
server: {
options: {
hostname: 'localhost',
port: 9001,
base: '.'
}
}
},
protractor_webdriver: {
webDriverStart: {
options: {
path: './node_modules/protractor/bin/',
command: 'webdriver-manager start'
}
},
},
protractor: {
options: {
configFile: 'protractor-conf.js',
keepAlive: false,
noColor: false,
args: { }
},
test: {
options: {
configFile: 'protractor-conf.js',
args: { }
}
}
}
});
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-protractor-runner');
grunt.loadNpmTasks('grunt-protractor-webdriver');
grunt.registerTask('test', ['connect', 'protractor_webdriver:webDriverStart', 'protractor:test']);
};
{
"devDependencies": {
"grunt": "~0.4.5",
"grunt-contrib-connect": "~0.10.1",
"grunt-protractor-runner": "~2.0.0",
"protractor": "~2.1.0",
"grunt-protractor-webdriver": "~0.2.0"
},
"scripts": {
"test": "grunt test"
}
}
exports.config = {
seleniumAddress: 'http://localhost:4444/wd/hub',
specs: ['test/*.js'],
baseUrl: 'http://localhost:9001',
jasmineNodeOpts: {
showColors: true,
isVerbose: true,
realtimeFailure: true,
includeStackTrace: true,
defaultTimeoutInterval: 30000
},
multiCapabilities: [{ browserName: 'firefox' }]
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment