pytest-json-report icon indicating copy to clipboard operation
pytest-json-report copied to clipboard

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

Open FelixSchwarz opened this issue 1 year ago • 1 comments

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?

FelixSchwarz avatar Nov 15 '23 10:11 FelixSchwarz

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.

alexandrul avatar Mar 16 '24 17:03 alexandrul