Skip to content

Changing path of html directory using a fixture value for parametrized test #572

Open
@jnunez10010

Description

@jnunez10010

Hello everyone,

I was wondering if there was a way to change the output path of the html report after the test has run by using a test fixture which contains the name and parametrized values of a test i.e. :

during the test there is a fixture that creates a directory whose name is based on the values of the current test, for example :
output_path = /path/to/test/test_name_parametrized_val1_val2.

However since the value of the config.option.htmlpath seems to be given during the pytest_configure hook and the tests have not been intialized yet (output_path is not yet created and, even if it was, it is not reachable from the pytest_configure hook) I haven't been able to figure this one out yet.

I would really appreciate any advice on how to accomplish this and I apologize if the solution is trivial as I'm quite new to pytest...

Thanks and have a good day!

Metadata

Metadata

Assignees

No one assigned

    Labels

    next-genCandidate for the next-gen project

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions