Skip to content
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

Allure report do not attach screenshot with robot framework + jenkins. #1096

Closed
mit4ever opened this issue May 26, 2020 · 6 comments
Closed

Comments

@mit4ever
Copy link

Hi,

I was installed allure report on jenkins + robot framework => Allure report was successfully generated.
But on test case fail not attach screenshot https://imgur.com/a/6ufKjHq
Config allure in job : https://imgur.com/a/3Q9KZxo
Log console job : https://imgur.com/a/c5ZCdK4
What should I do in testcase attach sreenshot ?

Thanks.

@skhomuti
Copy link
Contributor

skhomuti commented Jun 1, 2020

@tuyenlq please see example of selenium plugin in allure-framework/allure-python#476
by default selenium screenshots not attached

@xianglongfei-8888
Copy link

xianglongfei-8888 commented Jun 2, 2020

I have the same problem

eg:

*** Settings ***
Library           Screenshot    screenshots    screenshot_module=scrot
Library           DateTime

*** Keywords ***
Keyword Screenshot
    Create Directory    ./screenshots
    ${ctime}    Get Current Date
    Take Screenshot    ${ctime}.jpg

*** Test Cases ***
......
[Teardown]   Run Keyword If Test Failed    Keyword Screenshot

robot -i 'test' --listener allure_robotframework --outputdir ./robot applications/test_desktop.robot

allure generate ./output/allure --clean -o allure-report

Allure report was successfully generated => like this : allure-report/data/screenshots/xxxx.jpg
But without screenshots/xxxx.jpg

I can copy screenshots floder to allure-report/data/
But jenkins: How to add screenshots floder save location allure-report/data/

@mit4ever
Copy link
Author

mit4ever commented Jun 2, 2020

@skhomuti
Hi,
I tried but it not work and allure support robotframework appium ?

Thanks

@skhomuti
Copy link
Contributor

skhomuti commented Jun 2, 2020

@xianglongfei-8888 you can use the approach with an additional library, see this example https://github.com/allure-framework/allure-python/blob/master/allure-robotframework/examples/attach/foreign_library_helper.py

The same approach can be used for appium. Selenium is more convenient due to its plugin system. for other libraries you need to use keyword name redefinition.

@baev baev closed this as completed Nov 8, 2020
@fengnex
Copy link

fengnex commented Nov 17, 2020

The bug still exists in v2.8.19, the latest version of allure-robotframework!

I wonder how to fix it, and can anyone help out?

@vploaia
Copy link

vploaia commented Nov 18, 2020

Hi all. I tried to implement the above solution but screenshots still not present in allure reports.
Allure version: 2.13.6
Python: 3.8.2
robotframework-allurereport: 1.1.1
allure-robotframework: 2.8.19
image

Looking forward to your support :)

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

No branches or pull requests

6 participants