Skip to content

Pytest plugin: xdist-compatible stats collection breaks strict XML report validation #1935

@danilomendesdias

Description

@danilomendesdias

As documented in https://docs.pytest.org/en/latest/usage.html#record-property, record_property (or its equivalent usage through custom markers, which I think that it is the approach chosen by hypothesis) is an experimental fixture that can break if <properties> inside <testcase> is not expected by XML schema verification.

My use case is to run in a CI server with jenkins + junit plugin (which I can't modify basically anything) and I'm not able to run newer versions of hypothesis due this. I know that having hypothesis information in reports is a nice feature, but as it can cause this kind of problems, my suggestion is to make it at least configurable by adding something like --turn-off-hypothesis-stats-on-reports.

Maybe this option is already available, but I couldn't find anything on docs. I can also contribute with a PR if you guys approve the idea and point me where to start.

Thanks in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementit's not broken, but we want it to be bettermetafor wider topics than the software itself

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions