Iam运行Protractor-cucumber测试并生成诱惑报告,报告已生成但由于某种原因报告未显示完整的测试结果,我已按照下面“https://www.npmjs.com/package/cucumberjs-allure-reporter”中提到的所有说明进行操作xml文件生成
<ns2:test-suite xmlns:ns2="urn:model.allure.qatools.yandex.ru" start="1490864784836" stop="1490864784933">
<name>1</name>
<title>1</title>
<test-cases>
<test-case start="1490864784839" stop="1490864784931" status="passed">
<name>Login and Enter Customer Details</name>
<title>Login and Enter Customer Details</title>
<description></description>
<labels>
</labels>
<parameters>
</parameters>
<steps>
<step start="1490864784840" stop="1490864784847" status="passed">
<name>I navigate to "http://test.index.html;</name>
<title>I navigate to "http://test.index.html;</title>
<attachments>
</attachments>
<steps>
</steps>
</step>
<step start="1490864784848" stop="1490864784865" status="passed">
<name>I login as test</name>
<title>I login as test</title>
<attachments>
</attachments>
<steps>
</steps>
</step>
<step start="1490864784865" stop="1490864784866" status="passed">
<name>check whether login is successful</name>
<title>check whether login is successful</title>
<attachments>
</attachments>
<steps>
</steps>
</step>
<step start="1490864784866" stop="1490864784868" status="passed">
<name>the protractor api should be available</name>
<title>the protractor api should be available</title>
<attachments>
</attachments>
<steps>
</steps>
</step>
以下是reporter.js
var reporter = require('cucumberjs-allure-reporter');
reporter.config(
{
targetDir:'./allure-results/'
}
);
module.exports = reporter;
以下是黄瓜诱惑装置细节 npm WARN Calms3@1.0.0需要黄瓜@&gt; = 1.2.0的同行,但没有安装。 npm WARN cucumberjs-allure-reporter@1.0.3需要黄瓜同伴@&gt; = 1.2.0但没有安装。 npm WARN grunt-protractor-runner@3.2.0需要grunt @&gt; = 0.4.0的同行,但没有安装。 npm WARN Calms3@1.0.0没有存储库字段。 npm WARN Calms3@1.0.0无许可证字段。
有人可以帮忙吗...
以下是conf.js
exports.config = {
seleniumAddress: 'http://localhost:4444/wd/hub',
specs: [
'features/sample.feature'
],
capabilities: {
'browserName': 'chrome',
chromeOptions: {
args: [
'--start-maximized'
]
}
},
framework: 'custom',
frameworkPath: require.resolve('protractor-cucumber-framework'),
cucumberOpts: {
require: 'features/*.js',
format: 'pretty'
},
};
{
"name": "Calms3",
"version": "1.0.0",
"description": "Protractor framework for Cucumber.js",
"main": "Conf.js",
"engines": {
"node": ">=6.9.x"
},
"scripts": {
"webdriver": "webdriver-manager update --standalone --versions.standalone=2.53.1 && webdriver-manager start --versions.standalone=2.53.1"
},
"keywords": [
"angular",
"test",
"testing",
"webdriver",
"webdriverjs",
"selenium",
"protractor",
"protractor-framework",
"cucumber",
"cucumber-js",
"gherkin",
"bdd"
],
"peerDependencies": {
"cucumber": ">= 1.3.0 || >= 2.0.0-rc.0",
"protractor": ">= 3.0.0"
},
"devDependencies": {
"chai": "3.5.0",
"chai-as-promised": "6.0.0",
"eslint": "3.17.1",
"express": "4.15.2",
"httpster": "1.0.3",
"multidep": "2.0.2",
"protractor": "5.1.1",
"jasmine-allure-reporter": "1.0.1",
"jasmine-reporters": "2.2.1",
"selenium-webdriver": "3.3.0",
"winston": "2.3.1",
"protractor-html-screenshot-reporter": "0.0.21",
"protractor-jasmine2-screenshot-reporter": "0.3.3",
"protractor-jasmine2-html-reporter": "0.0.7",
"jasmine-core": "2.5.2",
"protractor-helpers": "1.1.0",
"cucumberjs-allure-reporter": "^1.0.3"
},
"cucumberConf": {
"version1": "1.3.1",
"version2": "2.0.0-rc.8"
}
}
报告没有显示执行步骤的任何内容..
答案 0 :(得分:0)
啊,我从你的package.json看到,你正在使用黄瓜peerDependency 1.3.0或2.0 rc,你看到诱惑记者目前不支持黄瓜版&gt; 2.0。所以你必须使用黄瓜1.3.0才能成功生成诱惑报告。
截至目前,请删除黄瓜2.0依赖项并仅使用1.3.0,您将能够看到您的报告。
我相信未来的诱惑 - 记者会支持最新的黄瓜版本(2.0)