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

fix: file name is not unique enough when running tests in parallel #3697

Merged
merged 2 commits into from
Jun 23, 2023

Conversation

kobenguyent
Copy link
Collaborator

Motivation/Description of the PR

  • The fileName is not unique when running tests in parallel and it leads to the issue that attachment couldn't attach to allure report.

Applicable helpers:

  • Playwright

Type of change

  • 🐛 Bug fix

Checklist:

  • Tests have been added
  • Documentation has been added (Run npm run docs)
  • Lint checking (Run npm run lint)
  • Local tests are passed (Run npm test)

@EgorBodnar
Copy link
Contributor

EgorBodnar commented Jun 10, 2023

a good fix, as a result of our discussion 🙌

The custom attachment fileName should be unique for reporters or it would be rewritten

Copy link
Contributor

@EgorBodnar EgorBodnar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the fileName be unique for one test or it probably should be unique within one test step too?

  • If it should be unique per test, use mocha current test id or nodejs worker.threadId

  • If it should be unique within one test use already installed CodeceptJS dependency - uuid to generate really unique id.

So better to delete the new function makeId(length) {}

@kobenguyent
Copy link
Collaborator Author

Should the fileName be unique for one test or it probably should be unique within one test step too?

  • If it should be unique per test, use mocha current test id or nodejs worker.threadId
  • If it should be unique within one test use already installed CodeceptJS dependency - uuid to generate really unique id.

So better to delete the new function makeId(length) {}

updated per CR. Thanks for pointing it out!

@kobenguyent kobenguyent merged commit 9c92294 into 3.x Jun 23, 2023
@kobenguyent kobenguyent deleted the fix-trace-name-issue branch June 23, 2023 03:35
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants