量角器-黄瓜诱惑报告未显示完整的测试结果



我正在运行量角器黄瓜测试并生成诱惑报告,正在生成报告,但由于某种原因报告未显示完整的测试结果,我已经按照下面的"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 &quot;http://test.index.html;</name>
                    <title>I navigate to &quot;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>

下面是记者.js

var reporter = require('cucumberjs-allure-reporter');
reporter.config(
    {
        targetDir:'./allure-results/'
    }
);
module.exports = reporter;

以下是黄瓜诱惑安装细节npm 警告 Calms3@1.0.0 要求对等方 cucumber@>= 1.2.0,但未安装任何对等体。npm WARN Cucumberjs-allure-reporter@1.0.3 需要 cucumber@>= 1.2.0 的对等体,但没有安装任何对等体。npm WARN grunt-protractor-runner@3.2.0 需要 grunt@>=0.4.0 的对等体,但没有安装任何对等体。npm 警告 Calms3@1.0.0 无存储库字段。npm 警告 Calms3@1.0.0 无许可证字段。

有人可以帮忙吗..

以下是会议.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'
  },
};

Package.json

{
  "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"
  }
}

报告不显示有关已执行步骤的任何内容。

啊,我从你的package.json中看到,你正在使用黄瓜peerDependency 1.3.0或2.0 rc,你看到allure reporter目前不支持黄瓜版本>2.0。因此,您只需使用黄瓜 1.3.0 即可成功生成诱惑报告。

截至目前,请删除 Cucumber 2.0 依赖项并仅使用 1.3.0,您将能够看到您的报告。

我相信将来的诱惑报告器会支持最新的黄瓜版本(2.0(

最新更新