-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Description
Have you read the Contributing Guidelines on issues?
- I have 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.2What 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.
- Use WebdriverIO with Jasmine as the framework.
- Define nested describe blocks in your test code.
- Run tests with @wdio/allure-reporter configured.
- 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 neededCode 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