-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make available artifacts path in test request #247
Comments
Thanks! I'd like to suggest an alternative: providing an Two questions for implementation:
Would this approach work for your needs? |
you can use @pytest.hookimpl(tryfirst=True)
def pytest_runtest_logreport(report):
if report.failed:
log_files_message = (
"it's a failure "
f"screenshot {screenshot_path_here}"
)
if getattr(report.longrepr, "sections", None) is not None:
report.longrepr.sections.append(
(
"artifacts",
log_files_message,
"-",
)
)
what do you mean with upload?
|
Sorry for the late reply - I prototyped #248 - do you mind checking if it would work for you? I also added an example using |
During the execution playwright produces different artifacts such as screenshots, videos or traces.
Some of them are already save and made available in the class
ArtifactsRecorder
.I've created this PR to standardize how the plugin saves the paths as class attribute (videos were missing) and to copy in the test request the final result.
The final goal is to have them in the test request, so they can be, for instance, used in the test report or somewhere else in the test flow.
Originally posted by @mxschmitt in #241 (comment)
The text was updated successfully, but these errors were encountered: