I use protractor to test my angular app. When I manually launch protractor it works properly and tests everything but the trouble comes when I try to launch it through grunt.
When I launch my grunt task for testing, protractor finds the conf file (it displays the right number of specs to test) but just open the chrome driver for less than a seconds on a weird "data;" url, close it right away and marks all the tests as "passed".
Here is my gruntfile.js for protractor:
protractor: {
options: {
configFile: "e2e-tests/protractor.conf.js", // Default config file
keepAlive: false, // If false, the grunt process stops when the test fails.
noColor: false, // If true, protractor will not use colors in its output.
args: {
verbose: true,
}
},
all: {}
}
and my protractor conf file:
exports.config = {
allScriptsTimeout: 11000,
seleniumAddress: 'http://localhost:4444/wd/hub',
specs: [
'*.js'
],
capabilities: {
'browserName': 'chrome'
},
baseUrl: 'http://localhost:8000/',
framework: 'jasmine',
jasmineNodeOpts: {
defaultTimeoutInterval: 30000
}
};
Again, if I manually launch protractor on the same conf file it works (even if I use the local protractor in the local node_modules directory) I really don't understand what's going on.
Thanks a lot guys !