Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate Before or After Hook Entries in Allure Report for Multiple Tests in a Describe Block #1171

Open
iamatharva opened this issue Oct 16, 2024 · 0 comments

Comments

@iamatharva
Copy link

Description:
When a describe block contains multiple tests, the Before or After hook entries in the Allure report are duplicated for each test. Although the test execution is accurate, the repeated Before hook entries can cause confusion, as they appear multiple times for each test in the report. Referring to any of these duplicated entries provides the correct information, but the duplication affects the clarity and readability of the test results.
Where are the before all is reported and displayed correctly.

Steps to Reproduce:

  1. Create a describe block with more than one test case.
  2. Add a Before hook and After hook that runs before each test.
  3. Execute the test suite and generate the Allure report.
  4. Review the report, specifically the logs for the Before and After hook.

Expected Behavior:
The Before and after hook should appear once, representing its execution for the associated test cases, without being duplicated in each test.

Actual Behavior:
The Before and After hook entry is duplicated in the Allure report for each test within the describe block.

Environment:

Allure version: 2.30.0
Test framework: Mocha Webdriverio
Node version: 18.16.0

Additional Information:
While the duplication doesn't impact the test execution itself, it can make reviewing the Allure report more cumbersome. The behavior may cause confusion during test result analysis, as users must realize that the duplicated Before entries refer to the same hook execution.

@baev baev transferred this issue from allure-framework/allure-npm Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants