webdriverio: Allure option `useCucumberStepReporter: true` providing `undefined` status with skipped test
Environment (please complete the following information):
WebdriverIO version: 5.11.12
Mode: WDIO Testrunner
If WDIO Testrunner, running sync/async: [sync
Node.js version: 10.15.3
NPM version: 6.10.2
Browser name and version: Chrome 68
Platform name and version: Windows 10
Additional wdio packages used (if applicable): @wdio/allure-reporter, @wdio/cucumber-framework
Describe the bug
~When one test case failed, the other test cases skipped because of dependency. But I have generated report via allure report, the skipped test cases status is undefined.~
When the Allure report with the option useCucumberStepReporter: true is used, the status of a skipped test becomes undefined, then the useCucumberStepReporter: true is not provided the status of the skipped test is skipped which is correct.
~wdio v4 these test cases status is skipped.~ This worked correctly in WebdriverIO V4
To Reproduce ~Skipped any steps of test case.~
exports.config = {
//...
reporters: [
'spec',
['allure', {
outputDir: '.tmp/allure-result',
disableWebdriverStepsReporting: true,
disableWebdriverScreenshotsReporting: true,
useCucumberStepReporter: true
}],
],
//...
}
@feature-tag
Feature: Create passed feature
the description
@scenario-tag
Scenario: Open website
Given I open "http://webdriver.io/"
Then the title would say "WebdriverIO ยท Next-gen WebDriver test framework for Node.js"
@scenario-tag
Scenario: Open other website
Given I open "https://developer.mozilla.org/nl/"
Then the title would say "MDN-webdocumenten"
// Steps
import { Given,Then } from 'cucumber';
Given(/I open "(.*)"/, function (url) {
return 'skipped';
});
Then(/the title would say "(.*)"/, title => {
expect(browser.getTitle()).to.equal(title);
});
Expected behavior
Test case status is skipped not unknown like when the Allure option useCucumberStepReporter: false
Updated issue with proper information about the issue
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 29 (18 by maintainers)
Commits related to this issue
- @wdio/allure-reporter: Fix undefined/unknown step status Fixes #4409 — committed to Kignuf/webdriverio by Kignuf 5 years ago
- @wdio/allure-reporter: Fix undefined/unknown step status (#4420) Fixes #4409 — committed to MoveInc/webdriverio by Kignuf 5 years ago
#4420
@christian-bromann it is just a bug with easy fix - use
pendingstatus as it was in v4.@Kignuf can I ask you make PR for this?
Hello @christian-bromann and @wswebcreation ,
Finally I have figured the problem out.
The problem is that allure report configuration. When I set
useCucumberStepReporter: truethe test case status is unknown.But When I have removed
useCucumberStepReporter: trueline, test case status is skipped.And also created xml files also changing.
You can see that below screenshot, if you removed
useCucumberStepReporter: truethat line, your test step is not sorted.