黄瓜量角器没有结果 运行
No results from cucumber protractor run
我在黄瓜上使用量角器,
首先,在没有黄瓜的情况下,我成功地进行了 运行 测试,但是当我通过 npm 添加黄瓜支持后,我得到了未定义测试的结果,见下文:
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
这意味着 chromeDriver 启动并在几秒钟后关闭,
我已经在两个项目上尝试过,一个在 git 上:
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:
<div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre><code>
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'
}
};
我在黄瓜上使用量角器, 首先,在没有黄瓜的情况下,我成功地进行了 运行 测试,但是当我通过 npm 添加黄瓜支持后,我得到了未定义测试的结果,见下文:
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
这意味着 chromeDriver 启动并在几秒钟后关闭, 我已经在两个项目上尝试过,一个在 git 上: 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:
<div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre><code>
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'
}
};