-
Notifications
You must be signed in to change notification settings - Fork 70
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
[FEATURE] Allow attaching screenshot and video into Allure report #77
Comments
@YusukeIwaki curious did you get similar code to work for trace zip file to attach to allure report? and just so understand your code does this only attach video/screenshot on failure? or this actually integrating with |
One thing (and perhaps this question best serviced and asked https://github.com/microsoft/playwright-python) but was thinking that would be nice in general for screenshot/videos/trace if had option to get file so could and just use
|
Hello, it's a kind follow-up if this feature request will be worked on. Thanks! |
@YusukeIwaki I saw your article and I like your solution and it does attach screenshot and videos on test failure, however with my current setup in addition to your makereport function, I seem to have a slight conflicting problem. my current setup: import os import allure @pytest.fixture(scope='function', autouse=True) @pytest.fixture(scope="session") @pytest.fixture(scope="session") @pytest.fixture(scope="session") @pytest.fixture(scope="session") @pytest.fixture(scope="function", autouse=True) def pytest_runtest_makereport(item, call) -> None: |
I usually use Allure report with PyTest+Playwright.
Test code (intented to fail)
Motivation
I want to store the video for failed tests.
I don't want to keep sitting at the laptop for observing flaky test failure :)
So I used to attach video into Allure report.
https://zenn.dev/yusukeiwaki/articles/cfda648dc170e5#%E3%83%86%E3%82%B9%E3%83%88%E5%A4%B1%E6%95%97%E6%99%82%E3%81%AE%E3%83%AC%E3%83%9D%E3%83%BC%E3%83%88%E3%81%AB%E5%8B%95%E7%94%BB%E3%82%92%E6%B7%BB%E4%BB%98%E3%81%99%E3%82%8B (Sorry in Japanese)
When we handle a lot of test cases, it is useful to put screenshot and video into Allure report (not in test-report directory), because it is really hard to find the video file from a list of many files for each failure.
Problem
#70 brought very useful feature. Thank you :)
However it doesn't put video and screenshots into Allure report as attachments.
For putting them into Allure report, we still have to write the script like below.
Feature Request
Attach screenshot and videos into Allure report when
--alluredir
is specified (of cource only when--video=on/retain-on-failure
or--screenshot=on/retain-on-failure
is specified)The text was updated successfully, but these errors were encountered: