You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ran testcases by multi-threads, then allure raised /usr/local/lib/python3.9/site-packages/allure_commons/reporter.py:33: KeyError #697
The changes you are referring to were introduced to deal with (2).
I'll take a look on how to add support for (1). We also have issue with an async concurrency that needs to be addressed as well.
As for now, I advise you (if possible) to utilize xdist, i.e. to use parallel execution in separated processes instead of running tests concurrently in multiple threads. If you don't need to share a common state across your tests that should do the job.
Activity
skhomuti commentedon Oct 12, 2022
@ae86sen could you please provide code examples and how exactly you run tests by multi-threads?
ae86sen commentedon Nov 28, 2022
run.py
testcase_demo.py
It doesn't have to raised “keyerror” ,but i haven't found the necessary conditions,It seems to be related to the thread isolation of allure?
ae86sen commentedon Dec 5, 2022
it seems to have something to do with the ”@allure.step“.
there is a new code example:
test_demo.py
run.py
when i ran run.py, raised the error:


ae86sen commentedon Dec 5, 2022
i tried to run with v2.8.24 of allure-pytest, it's no problem.

ae86sen commentedon Dec 5, 2022
delatrie commentedon Dec 5, 2022
Hi, @ae86sen
Thanks for complete examples and highlights.
The thing is that we have two slightly different scenarios related to multithreading with allure:
The changes you are referring to were introduced to deal with (2).
I'll take a look on how to add support for (1). We also have issue with an async concurrency that needs to be addressed as well.
As for now, I advise you (if possible) to utilize xdist, i.e. to use parallel execution in separated processes instead of running tests concurrently in multiple threads. If you don't need to share a common state across your tests that should do the job.
ae86sen commentedon Dec 6, 2022
thanks!Looking forward to your good news~