numirias / pytest-json-report

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

ability to "inject" data from json report into other pytest run? #93

Open FelixSchwarz opened 12 months ago

FelixSchwarz commented 12 months ago

I have a main pytest suite but there is a second test suite. That second test suite also uses pytest but needs a completely different execution environment. One example might be that this second test suite is execute inside a docker container. Still for the developer I want to make test execution/reporting as easy as possible so my idea was to write some pytest hooks to trigger test execution and then use a json report to inject the results back into pytest's main session.

I think the report contains all the information I need for that but I was wondering if there is some existing "glue" code to make this happen. Is this a use case that is already covered by code in this repo?

alexandrul commented 7 months ago

I think your proposal is out of scope, unfortunately. I have solved similar scenarios with a separate Python script that handles the execution and/or report processing.