Skip to content

[🐛 Bug]: Allure step() not working in failures. #11351

@deyvisPedrosa

Description

@deyvisPedrosa

Have you read the Contributing Guidelines on issues?

WebdriverIO Version

^8.16.20

Node.js Version

v18.16.0

Mode

WDIO testrunner

Which capabilities are you using?

{
  browserName: 'chrome',
  browserVersion: 'stable'
}

What happened?

Allure report API method step() does not show any error when a line within it fails. For instance, if an assertion inside step() fails, it will not be shown in the report, and the test succeeds without noticing that failure.

What is your expected behavior?

When an assertion fails, then the test case should fail too.

How to reproduce the bug.

To reproduce the bug, clone the following public repo allure.step.bug

This repo has wdio project with its latest versions. It includes the spec file test/specs/allureStep.test.js with two different examples of the described 'bug'.
To run those scripts, first run npm install. After having the repo clone and installing the npm dependencies, hit npm run wdio.

The npm run wdio command should execute a script that tries to log into a public website and has a wdio assertion inside an allure step() that should fail.

Scripts:
image

Allure report:
image

Relevant log output

"spec" Reporter:
------------------------------------------------------------------
[chrome 117.0.5938.92 windows #0-0] Running: chrome (v117.0.5938.92) on windows
[chrome 117.0.5938.92 windows #0-0] Session ID: f95ea2bd85df3b8c87ac1f437e5e2625
[chrome 117.0.5938.92 windows #0-0]
[chrome 117.0.5938.92 windows #0-0] » \test\specs\allureStep.test.js
[chrome 117.0.5938.92 windows #0-0] My Login application
[chrome 117.0.5938.92 windows #0-0]     Should login with valid credentials
[chrome 117.0.5938.92 windows #0-0]     Should login with valid credentials (Throw error)
[chrome 117.0.5938.92 windows #0-0]
[chrome 117.0.5938.92 windows #0-0] 2 passing (18.1s)


Spec Files:      1 passed, 1 total (100% completed) in 00:00:27

2023-10-04T13:42:00.044Z INFO @wdio/local-runner: Shutting down spawned worker
2023-10-04T13:42:00.308Z INFO @wdio/local-runner: Waiting for 0 to shut down gracefully
2023-10-04T13:42:00.309Z INFO @wdio/local-runner: shutting down

Code of Conduct

  • I agree to follow this project's Code of Conduct

Is there an existing issue for this?

  • I have searched the existing issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions