私はキュウリ、 で分度器を使用しています。キュウリなしでは、私はテストを実行することに成功しましたが、すぐにキュウリのサポートをnpm経由で追加しました。 chromeDriverが始まると数秒を閉じた後に意味キュウリの分度器の実行結果がありません
1 scenario (1 undefined)
3 steps (3 undefined)
0m00.000s
[15:04:58] I/launcher - 0 instance(s) of WebDriver still running
[15:04:58] I/launcher - chrome #01 passed
Process finished with exit code 0
、 私は1つがgitの上にある、2つのプロジェクトでそれを試してみました: https://github.com/eis95/CucumberProtractorExample
ので、あなたは、私は設定を定義し、また、どのように見ることができますpackages.jsファイル パッケージファイル:
{
"name": "uiautomation-v2.0",
"version": "0.0.0",
"description": "UIAutomationV2.0",
"main": "app.js",
"author": {
"name": "Eyal.Cohen"
},
"devDependencies": {
"cucumber": "^2.3.1",
"protractor-cucumber-framework": "^3.1.2"
},
"dependencies": {
"@types/jasmine": "^2.5.53",
"protractor": "latest"
}
}
And the conf.js file:
exports.config = {
specs: ['features/**/*.feature'],
//seleniumServerJar:'./node_modules/protractor/selenium/selenium-server-standalone-2.52.0.jar',
//chromeDriver: './node_modules/protractor/selenium/chromedriver_2.21',
seleniumAddress: 'http://localhost:4444/wd/hub',
capabilities: {
'browserName': 'chrome'
},
framework: 'custom',
frameworkPath: require.resolve('protractor-cucumber-framework'),
cucumberOpts: {
tags: [],
require: ['features/step_definitions/newGameSteps.js'], //'features/specSetup.js','features/**/step_definitions/**/*Steps.js'
format: 'pretty'
}
};
仕様:
defineSupportCode(function({Given, When, Then}) {
Given(/^Navigate to studio url$/, function(callback) {
//callback(null, 'pending');
navigationSteps.navigateToStudio(data.server).then(function() {
loginPage.userName.isDisplyed();
})
callback();
});
When(/^Login with username and pass$/, function(callback) {
navigationSteps.loginToStudio(data.username, data.password).then(function() {
navigationSteps.navigateUrl(data.server + '/studio/#/sxp?isautomation=true').then(function() {
})
callback();
});
});
Then(/^Welcome page is displayed$/, function(callback) {
sxpSteps.sendSxp(testData.requestNewTaskSxp).then(function() {
navigationSteps.navigateToUrl(data.server + '/studio/#/schedule').then(callback)
});
callback();
});
})。
何かが間違っている、あなたの提供する情報をもとにあなたの助け おかげ
あなたは完全なロギングとあなたのステップの実装を提供することはできますか?コンソールに不足しているシナリオが出力されるようになりました。ステップファイルがある場合、これは見つからない/コードが正しくないことを意味するはずです。最後の質問ですが、なぜあなたは分派器とキュウリの古いバージョンを使用していますか?これはブラウザーとサポートに問題を引き起こす可能性があります。分度器は5.1.2にすでにあるとCucumberJSは私が更新分度器とキュウリを持っていますが、package.jsはそれが正しいと更新されません1.3.3/2.3.1 – wswebcreation
にすでにありますか?私は何かが恋しい? 、ちょうどnpmを使ってアンインストールし、分度器をインストールしてください:npm install protractor ....右? – user1937902
私はSEPCコードを追加 - ポストで見 – user1937902