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

Test cases with same name across multiple specs get recognized as one #209

Closed
fleks-dev opened this issue May 25, 2023 · 6 comments
Closed
Labels
done enhancement New feature or request

Comments

@fleks-dev
Copy link

Describe the bug
I have 2 spec files:

  • a.cy.ts
  • b.cy.ts

Both spec files have the following code

it('Create model', () => {
  // some code
})

In the report they are recognized as one(overwritten as it seems).

Expected behavior
They should be recognized as different tests if they're in separate spec files.

Environment (please complete the following information):

  • Cypress version: 12.12.0
  • OS: Linux (Ubuntu):
  • cypress-allure-plugin 2.39.1
@fleks-dev fleks-dev added the bug Something isn't working label May 25, 2023
@fleks-dev
Copy link
Author

Is there any workaround where I can get the expected behavior?

@ParTee71
Copy link

ParTee71 commented Jun 2, 2023

+1

@begli80
Copy link

begli80 commented Jun 8, 2023

I have the same issue , if different spec files contain the same test case description, gets recognized as one

@Shelex Shelex added enhancement New feature or request and removed bug Something isn't working labels Jun 8, 2023
@Shelex
Copy link
Owner

Shelex commented Jun 8, 2023

@ktxxt @ParTee71 @begli80

Indeed, that is the behavior of allure reporter.

allure-framework/allure2#1196
allure-framework/allure2#1058

Is there any workaround where I can get the expected behavior?

In v2.40.0 have added a way to specify what will be used to calculate historyId for Allure to separate tests by their file path, or browser, or anything else you would like.

docs - https://github.com/Shelex/cypress-allure-plugin#test-name-duplicates

example - https://shelex.github.io/cypress-allure-plugin-example/59/#suites/f06e574df226f26e791c6a61c44ed2d8/c5b8ba3c7e61f9d8/

@fleks-dev
Copy link
Author

fleks-dev commented Jun 8, 2023

Thank you!

@Shelex Shelex added the done label Jun 9, 2023
@Shelex Shelex closed this as completed Jun 10, 2023
@ParTee71
Copy link

Thanks! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
done enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants