В настоящее время я пытаюсь связать некоторые тесты Protractor E2E с ворчанием. Пока не так успешно. Во всех документах, которые мне удалось найти, говорится, что хрюканье должно хорошо сработать в моей ситуации. Однако после запуска webdriver-manager update --standalone
grunt завершает работу без сообщения об ошибке или запуска каких-либо других задач.
мой файл grunt:
'use strict';
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
protractor: {
options: {
configFile: "./conf.js", // Default config file
keepAlive: true, // If false, the grunt process stops when the test fails.
noColor: false, // If true, protractor will not use colors in its output.
args: {
// Arguments passed to the command
}
},
all: {} // Grunt requires at least one target to run so you can simply put 'all: {}' here too.
},
protractor_webdriver: {
update : {
options: {
path:'node_modules/.bin/',
command: ['webdriver-manager update --standalone']
},
},
e2eStart: {
options: {
keepAlive: true,
path:'node_modules/.bin/',
command: ['webdriver-manager start']
},
},
}
});
grunt.registerTask('default', ['protractor_webdriver:update', 'protractor_webdriver:e2eStart', 'protractor:all']);
grunt.loadNpmTasks('grunt-protractor-webdriver');
grunt.loadNpmTasks('grunt-protractor-runner');
};
Потому что кому-то может быть любопытно: packages.json
{
"name": "Protractor-me",
"description": "Protractor-me!",
"version": "0.0.1",
"devDependencies": {
"grunt": "^0.4.5",
"grunt-protractor-runner": "~2.0.0",
"grunt-protractor-webdriver": "~0.2.0",
"jasmine-reporters": "^2.0.7"
},
"install": {}
}
И, наконец, вывод grunt --verbose
$ grunt --verbose
Initializing
Command-line options: --verbose
Reading "Gruntfile.js" Gruntfile...OK
Registering Gruntfile tasks.
Reading package.json...OK
Parsing package.json...OK
Initializing config...OK
Registering "grunt-protractor-webdriver" local Npm module tasks.
Reading /Users/brianalbright/workspace/qa/personal/Brian/Angular/feed_editor_2/node_modules/grunt-protractor-webdriver/package.json...OK
Parsing /Users/brianalbright/workspace/qa/personal/Brian/Angular/feed_editor_2/node_modules/grunt-protractor-webdriver/package.json...OK
Loading "protractor_webdriver.js" tasks...OK
+ protractor_webdriver
Registering "grunt-protractor-runner" local Npm module tasks.
Reading /Users/brianalbright/workspace/qa/personal/Brian/Angular/feed_editor_2/node_modules/grunt-protractor-runner/package.json...OK
Parsing /Users/brianalbright/workspace/qa/personal/Brian/Angular/feed_editor_2/node_modules/grunt-protractor-runner/package.json...OK
Loading "protractor_runner.js" tasks...OK
+ protractor
Loading "Gruntfile.js" tasks...OK
+ default
No tasks specified, running default tasks.
Running tasks: default
Running "default" task
Running "protractor_webdriver:update" (protractor_webdriver) task
Verifying property protractor_webdriver.update exists in config...OK
File: [no files]
Options: path="node_modules/.bin/", command=["webdriver-manager update --standalone"], keepAlive=false
Starting Selenium server
>> selenium standalone is up to date.
>> chromedriver is up to date.
$
Он запускает обновление webdriver-manager, а затем останавливается. Насколько я понимаю, каждая задача должна выполняться по порядку и не останавливаться до тех пор, пока она не завершится или не возникнет ошибка. У меня нет идей!