Pytest reporting in JSON format



pip install pytest-json-report

pytest --json-report --json-report-file=report.json --json-report-indent=4

Recommended to also add


--json-report-omit=log


pytest -s --json-report --json-report-file=report.json --log-cli-level=INFO