numirias / pytest-json-report

🗒️ A pytest plugin to report test results as JSON
MIT License
146 stars 39 forks source link

JSON report not produced on parallel tests running #16

Closed rzegnam closed 5 years ago

rzegnam commented 6 years ago

Hi, I've tried to use your tools with pytest-xdist but it seems that when running tests in parallel pytest-json-report is not working

pytest -v -n 2 [TEST_FOLDER] --json-report --json-report-file=report.json

sosadchuk commented 5 years ago

Had the same issue, created a fork which solved problems with pytest-xdist for me: https://github.com/sosadchuk/pytest-json-report

If it would help you also, I will add this as pull-request to initial pytest-json-report

numirias commented 5 years ago

@rzegnam I just published a refactored version of the plugin to PyPI which is tested on xdist. Do you mind verifying whether the report is now produced as expected?