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 test names are merged as one test in report (even when fullname differs) #2117

Closed
1 task done
felipebn opened this issue Sep 22, 2023 · 1 comment
Closed
1 task done
Labels
type:bug Something isn't working

Comments

@felipebn
Copy link

Describe the Bug

Allure report generation treats 2 tests, within the same file but in different describes as retries.

Steps to Reproduce

  1. Create a test like below
  2. Run
  3. Generate the report
  4. It will show 1 test when 2 tests were executed

Note: one of the tests fail on purpose so we know we should see 1 failure and 1 success

test.describe('Playground', () => {
    test('test duplicate name', async () => {
        test.expect(true).toBe(false);
    });
    test.describe('on desktop', async () => {
        test('test duplicate name', async () => {
            test.expect(true).toBe(true);
        });
    });
});

Expected Behaviour

Seems like this is by design, but in the case of nesting under a describe or other grouping mechanism that would be expected to be accounted for.

Using the full name of the test available in the results could help prevent this behavior.

For Playwright at least, it already blows an error if there are duplicate test names in the same level.

Others have come across this and ended up circumventing like in Shelex/cypress-allure-plugin#209 , which is less ideal.

Screenshots or Additional Context

Results.json showing the duplicate names, but also the fullname, which ends up to be unique (between tests):

image

Allure report showing a single test, with retries as they duplicate name accounts for it:

image

What Language are you using?

TypeScript

What Framework/Allure Integration you are using?

allure-playwright

What version of Allure Integration you are using?

2.4.0

What version of Allure Report you are using?

2.23.1

Code of Conduct

  • I agree to follow this project's Code of Conduct
@felipebn felipebn added triage type:bug Something isn't working labels Sep 22, 2023
@felipebn
Copy link
Author

Just updated allure-playwright dependency to 2.8.1 and found out this was fixed in 2.7.0 on allure-playwright side as the hash seems to be generated there.

@baev baev removed the triage label Jan 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants