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

Mocha parallel mode and Allure API

Open epszaw opened this issue 2 years ago • 5 comments

Describe the bug We have a problem related to mocha parallel mode for a long time, there is some related issues in the repository: #485, #486.

To Reproduce Steps to reproduce the behavior:

  1. Use allure mocha reporter in parallel mode
  2. Try to call any allure API method such as label
  3. You'll see an error in console

Expected behavior We should be able to use Allure API with mocha in parallel mode.

Additional context At this moment, the problem can't be solved because mocha parallel mode implementation. The running uses workerpool module, what doesn't work with plain node IPC messages. Additionally, mocha doesn't provide any way to send messages from tests to the reporter, what works in the main thread, so we can't do anything at this moment to make both parts work correctly.

As temporal solution, I suggest to use single thread mode, if you need Allure API.

All the updates about the problem I'll post here, in the issue.

epszaw avatar Feb 20 '23 16:02 epszaw