Skip to content

[🐛 Bug]: Allure Reporter Fails to Maintain Nested describe Structure in WebdriverIO #13953

@VitaliMorgun

Description

@VitaliMorgun

Have you read the Contributing Guidelines on issues?

WebdriverIO Version

8.27.2

Node.js Version

latest

Mode

WDIO Testrunner

Which capabilities are you using?

WebdriverIO version: 8.27.2
@wdio/allure-reporter version: 9.2.14
@wdio/jasmine-framework: 8.27.2

What happened?

Problem
When using the @wdio/allure-reporter with Jasmine in WebdriverIO, nested describe blocks do not appear correctly in the Allure report. Instead of reflecting the full hierarchy of describe blocks, the Allure report flattens them into a single level.

Actual Behavior
The Allure report only shows top-level suites, with all describe blocks collapsed into one level. Sub-suites appear as separate, unrelated suites, like:

> Parent Suite: Sub Suite: Sub-Sub Suite
  - Test Case 1
  - Test Case 2

Additional Information
Attempts to dynamically manage the hierarchy using addParentSuite, addSuite, and addSubSuite within WebdriverIO hooks (beforeSuite, afterSuite) or by overriding the describe function have failed to resolve the issue. This behavior suggests a potential limitation in the @wdio/allure-reporter itself.

What is your expected behavior?

The Allure report should show a proper hierarchy of suites and sub-suites corresponding to the describe structure in the test code. For example:

> Parent Suite
  > Sub Suite
    > Sub-Sub Suite
      - Test Case 1
      - Test Case 2

How to reproduce the bug.

  1. Use WebdriverIO with Jasmine as the framework.
  2. Define nested describe blocks in your test code.
  3. Run tests with @wdio/allure-reporter configured.
  4. Generate the Allure report and observe the flattened suite structure.
describe('Parent Suite', () => {
  describe('Sub Suite', () => {
    it('should execute test case 1', () => {
      expect(0).toBe(0);
    });

    describe('Sub-Sub Suite', () => {
      it('should execute test case 2', () => {
        expect(0).toBe(0);
      });
    });
  });
});

Relevant log output

no needed

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

    Bug 🐛help wantedIssues that are free to take by anyone interested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions