Skip to content

Allure step in thread not show in report. #563

@nigredon1991

Description

@nigredon1991

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?

Steps do not appear in the report if they were launched inside a thread.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem

This example code for reproduce:

import allure
from concurrent.futures import ThreadPoolExecutor

@allure.step("lala")  
def lala(x=1):        
    print('run lala') 
                                
def test_lala():                                                                                  
    with ThreadPoolExecutor(max_workers=2) as executor: 
        executor.map(lala)                              

image

What is the expected behavior?

I would like the steps to appear in the report.

What is the motivation / use case for changing the behavior?

I need to run tests that execute commands remotely on multiple devices, so it's convenient to use threads, but the report does not contain steps declared inside the thread. Can you tell me if this can be done differently, or somehow forward the state to the parent thread.

Please tell us about your environment:

Other information

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions