I am executing my set of test cases using pytest-xdist with -n=3, and I am utilizing the --dist loadgroup option. Additionally, I have integrated pytest-html for generating HTML reports.However, I have encountered an issue where the generated report does not include screenshots for failed test cases. Strangely, when I run the same test cases without pytest-xdist, the report captures screenshots for failed test cases as expected.
Below command I have used :
pytest -v -n 3 --dist loadgroup test_AP_CP_LR.py --html=report_LR.html --self-contained-html
I would appreciate any guidance or solution to resolve this issue and enable pytest-html to capture screenshots for failed test cases in the generated HTML report when ran with pytest-xdist.