Skip to content

Ability to find the report location from within tests? (To ensure images are located correctly) #824

Description

@cc-stjm

I see that when adding an image with a relative path, it needs to be relative to the output report HTML.

From the command line, it's possible to run e.g. pytest --html ../report.html - is there any way to be able to get this path from within a test? That would allow me to save images to an appropriate relative path.

(I can't use absolute paths as I want to be able to copy the report & its assets to CI)

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions