numirias / pytest-json-report

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

metadata with record_property #57

Closed andrmuel closed 3 years ago

andrmuel commented 3 years ago

Hi

Would it be possible to add support for record_property(), so that key/values stored with record_property() end up in the JSON report?

I'm aware the same thing is already possible via json_metadata, but record_property() has the advantage that it is independent of the reporter, and since it is part of pytest, tests can still run if someone doesn't have pytest-json-report installed.

numirias commented 3 years ago

This seems to make a lot of sense.

But not sure when I'll be able to look into it. If you're keen to write a PR, you're welcome to.

andrmuel commented 3 years ago

I have created a PR separately. I'm afraid I'm rather limited in regards to time as well (and additionally in regards to knowledge about pytest), so I'm not too sure if it makes sense, and I have only tested it superficially.