Title: Step tree seems not correct in multithreaded testing · Issue #872 · allure-framework/allure-python · GitHub
Open Graph Title: Step tree seems not correct in multithreaded testing · Issue #872 · allure-framework/allure-python
X Title: Step tree seems not correct in multithreaded testing · Issue #872 · allure-framework/allure-python
Description: I'm submitting a ... bug report feature request support request => Please do not submit support request here, see note at the top of this template. What is the current behavior? When Thead#entrance spawned Thread#node, Thread#node spawne...
Open Graph Description: I'm submitting a ... bug report feature request support request => Please do not submit support request here, see note at the top of this template. What is the current behavior? When Thead#entrance...
X Description: I'm submitting a ... bug report feature request support request => Please do not submit support request here, see note at the top of this template. What is the current behavior? When Thead#e...
Opengraph URL: https://github.com/allure-framework/allure-python/issues/872
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Step tree seems not correct in multithreaded testing","articleBody":"[//]: # (\n. Note: for support questions, please use Stackoverflow or Gitter**. \n. This repository's issues are reserved for feature requests and bug reports.\n.\n. In case of any problems with Allure Jenkins plugin** please use the following repository \n. to create an issue: https://github.com/jenkinsci/allure-plugin/issues\n.\n. Make sure you have a clear name for your issue. The name should start with a capital \n. letter and no dot is required in the end of the sentence. An example of good issue names:\n.\n. - The report is broken in IE11\n. - Add an ability to disable default plugins\n. - Support emoji in test descriptions\n)\n\n#### I'm submitting a ... \n - [x] bug report\n - [ ] feature request\n - [ ] support request =\u003e Please do not submit support request here, see note at the top of this template.\n\n#### What is the current behavior?\n\nWhen Thead#entrance spawned Thread#node, Thread#node spawned Thread#session, step tree of allure seems incorrect?\n\n\u003cimg width=\"620\" height=\"889\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/8ed74de4-451c-44c7-9a9d-88476e483f38\" /\u003e\n\n#### If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem\n\n```python\nfrom concurrent.futures import ThreadPoolExecutor\nimport allure\n\n\ndef session_on_node(node_id, session):\n with allure.step(f\"Session#{session} on node {node_id}\"):\n pass\n\n\ndef parallel_task_for_specific_node(node_id):\n with allure.step(f\"Parallel task for node {node_id}\"):\n with ThreadPoolExecutor() as executor:\n for session in range(5):\n executor.submit(session_on_node, node_id, session)\n\n executor.shutdown(wait=True)\n\n\ndef test_multithreaded():\n with allure.step(\"Entrance\"):\n with ThreadPoolExecutor() as executor:\n for node_id in range(3):\n executor.submit(parallel_task_for_specific_node, node_id)\n\n executor.shutdown(wait=True)\n\n```\n\n#### What is the expected behavior?\n\nstep tree should be like this?\n\n```\nThread#entrance\n - Thread#node\n - Thread#session\n - Thread#session\n - Thread#session\n - Thread#node\n - Thread#session\n - Thread#session\n - Thread#session\n```\n\n#### What is the motivation / use case for changing the behavior?\n\nThere is a service combined of multiple nodes. Every node could handle several sessions from client. \nSometimes, parallel testing is needed: Multi sessions for multi nodes, which means main thread is to spawn threads of different node, thread of a single node is to spawn different threads of multiple session, and finally we collect every step and organize them in a friendly tree.\n\n#### Please tell us about your environment:\n\n- Allure version: 2.32.0\n- Test framework: pytest@7.4.4\n- Allure adaptor: allure-pytest@2.13.5\n\n#### Other information \n\n[//]: # (\n. e.g. detailed explanation, stacktraces, related issues, suggestions \n. how to fix, links for us to have more context, eg. Stackoverflow, Gitter etc\n)","author":{"url":"https://github.com/SalHe","@type":"Person","name":"SalHe"},"datePublished":"2025-08-05T12:49:25.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/872/allure-python/issues/872"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:6d1c6542-fa1e-3658-93fb-1f75d28006e0 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CD06:265036:5CA7F7:813BA6:696E5BA6 |
| html-safe-nonce | d9899e96f7cf6286ee471fdabc02e4d273550a4b22cd3277fda757d00cdd02fc |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRDA2OjI2NTAzNjo1Q0E3Rjc6ODEzQkE2OjY5NkU1QkE2IiwidmlzaXRvcl9pZCI6IjQ0MjkwMjg4OTUxMTc2OTU5MTAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | d76b36e5793457bebfc59b4919066d495edb87e125895ba42fffac8815760a02 |
| hovercard-subject-tag | issue:3292993731 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/allure-framework/allure-python/872/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6deb4c393eb8afb554d2e6108cf4eabc37028b5340b87f19e90ff3d6f6ad160f/allure-framework/allure-python/issues/872 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6deb4c393eb8afb554d2e6108cf4eabc37028b5340b87f19e90ff3d6f6ad160f/allure-framework/allure-python/issues/872 |
| og:image:alt | I'm submitting a ... bug report feature request support request => Please do not submit support request here, see note at the top of this template. What is the current behavior? When Thead#entrance... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | SalHe |
| hostname | github.com |
| expected-hostname | github.com |
| None | f68b42d371252b0f236260d6234f4304a806fe5ac43d59faa21fb59d80df103b |
| turbo-cache-control | no-preview |
| go-import | github.com/allure-framework/allure-python git https://github.com/allure-framework/allure-python.git |
| octolytics-dimension-user_id | 5879127 |
| octolytics-dimension-user_login | allure-framework |
| octolytics-dimension-repository_id | 79346720 |
| octolytics-dimension-repository_nwo | allure-framework/allure-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 79346720 |
| octolytics-dimension-repository_network_root_nwo | allure-framework/allure-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 6b74bc8dbcd10b5d69fd9ee9d2cfdc8b35e18a4c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width