allure-js icon indicating copy to clipboard operation
allure-js copied to clipboard

TypeError: allure.label is not a function

Open darkallure opened this issue 2 years ago • 8 comments

Describe the bug Getting an error when parallel mode is on while using Mocha

To Reproduce Steps to reproduce the behavior:

  1. Set parallel mode to true in mocha.rc config or use "--parallel" flag
  2. Run the tests
  3. Tests fail due to the following error: Uncaught TypeError: hook.error is not a function

Expected behavior The tests should run successfully in parallel mode with Mocha allure reporter

Screenshots image image

Additional context the following version packages are used: "allure-mocha": "^2.0.0-beta.19", "mocha": "^9.2.1"

darkallure avatar Aug 20 '22 12:08 darkallure

Could you please share more code or provide a repo, where would be possible to reproduce the problem?

epszaw avatar Sep 07 '22 10:09 epszaw

Uploading lmru--chords--functional-tests2.zip… Sure, here is a sample project

darkallure avatar Sep 08 '22 13:09 darkallure

@lamartire did you manage to check it out?

darkallure avatar Sep 12 '22 07:09 darkallure

example-js-allure.zip -- one more example

darkallure avatar Sep 12 '22 07:09 darkallure

Sorry guys, still working on the the solution

epszaw avatar Oct 03 '22 14:10 epszaw

Nice, please let me know in case there is an update, thanks

darkallure avatar Oct 03 '22 15:10 darkallure

Sorry for the long delay, but at this moment we're a bit paralyzed due parallel mode nuances. I've opened a PR (mochajs/mocha#4922) to mocha which provides required changes to restore back labels functionality, but I haven't yet got any response from them. Let's wait for the merge.

epszaw avatar Oct 17 '22 09:10 epszaw

any update on this? I'm having the same issue

BrianSalesLoft avatar Oct 03 '23 18:10 BrianSalesLoft

3.0.0-beta.1 introduced support for parallel mode

baev avatar May 31 '24 13:05 baev

The issue has been fixed in 3.0.0-beta.1. If anyone still struggles with using Allure API in parallel mode, feel free to open a new issue or post an update here.

delatrie avatar Jun 27 '24 08:06 delatrie