私のプロジェクトではGruntを角度とノードで使用しています。テストのために私はキュウリ+分度器+を使用 不機嫌そうな これがGruntfile.jsからの私の登録タスクです。
grunt.registerTask("test", [
"selenium_start",
"clean:server",
"ngconstant:testing",
"concurrent:test",
"autoprefixer",
"connect:test",
"karma",
"stubby",
"protractor",
"selenium_stop",
]);
私の問題は分度器のタスクが実行されたとき、スタブのタスクが終わったことです。
回答:
回答№1は1私の推測 - あなたはgrunt-protractor-runnerとgrunt-protractor-webdriverを利用して、どのポートスタブが待機しているかをgruntとprotractorに伝える必要があります、例えば:
grunt.initConfig({
..
// Grunt server settings
connect: {
stubby: {
options: {
..
port: 8001
..
}
}
},
..
protractor: {
..
stubby: {
options: {
..
args: {
baseUrl: "http://localhost:8001"
}
..
}
}
..
}
..
});
..
grunt.registerTask("test", [
..,
"karma",
"connect:stubby",
"stubby",
"protractor:stubby"
]);
..