numirias / pytest-json-report

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

can not use custom file name to store json report #56

Closed DigvijayPati closed 4 years ago

DigvijayPati commented 4 years ago

I am using following command to store report in given file in current directory. python3 -m pytest test.py --json-report-file=report.json It does not create any file. But when I run following command python3 -m pytest test.py --json-report It creates .report.json file in current directory.

numirias commented 4 years ago

The plugin only runs if --json-report is given. So, to create a report at a custom location, you need to use both flags:

python3 -m pytest test.py --json-report --json-report-file=report.json