Created
August 8, 2015 05:30
-
-
Save AlphaGit/176a7eede22fd1e5a77c to your computer and use it in GitHub Desktop.
Configuring Protractor to run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'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']); | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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" | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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