This report is not displaying screenshot
And the test case file names are concatenating instead it should display like
1.Logout
2.AddToCart
3.PlaceOrder
4.Logout
This is my project structure
I would like to provide if anything else is needed
Reporting to Allure is not part of the base Robot Framework functionality, so perhaps you are using an extension or other tool to do this reporting?
Mentioning what that extention/tool is in this question would be a good idea.
I would suggest you start by checking versions, bot of the tool your using to publish the test report and the version of robot framework you’re running, also check if the tool supports that version of robot framework?
I’ll note that with Robot Framework 7.0 the output.xml format changed, so if the tool that publishes to Allure is expecting the old format and you are using Robot Framework >= 7.0 you may need to use the --legacyoutput option (see Output file)
actually i have provided the screenshot but as i’m a new user this platform is not allowing me to upload . so any other platform to connect with you so that i can explain my issue.
Don’t worry about the screenshot, later you’ll be able to include it if it’s needed (the forums are restricted to new users because of spammers, I’m not an admin, just a forum user like you).
First what’s the tool that sends the report data to Allure? If I know that I can read the doc’s and try to help you resolve your issue. Also someone else who uses that tool might help too.
In the meantime can you open the log.html that Robot Framework generates and confirm you can see the screenshots in there, this way we can rule out any bugs in Robot Framework itself and narrow down where the problem is rather than chasing in wrong directions.
but when you follow that link it shows an example:
*** Settings ***
Library AllureLibrary
Library RequestsLibrary
*** Test Cases ***
Test Authentication
# ...
${response}= GET https://example.com/image.png
Attach ${response.content}
... name=Image attachment_type=PNG
Attach File /path/to/image.png
... name=Image attachment_type=PNG
So it’s not clear whether you need to use the Attach File or it will do it automatically?
Looking at the code base fo that project it looks like it’s not been updated for ~2 years (before Robot Framework 6.1) though it does correctly identify it’s listener api version as ROBOT_LISTENER_API_VERSION = 2 so it should work as I’ve not seen any notice of that api version being deprecated yet
As I mentioned this plugin / add on listener is not part of robot framework itself and I don’t use this listener so am not familiar with it.
All I can suggest follow their documentation for Attachments and if that doesn’t work contact the developers of this add on for robot framework.
You have not shared a single line of code on how the screenshot should be attached.
You didn’t mention at which point you see the image on filesystem but not on the web ui ? Is this in the robot’s output directory or in the temporary directory allure serve creates.
You dont mention if the image looks like broken image or not.
And one more; Is the “image missing” from the attach file keyword or from the screenshot keyword ?
If the screenshot is just missing from Take Screenshot keyword. This feels like a bug in allure itself, not even on the listener / library portion of allure-robotframework package. Albeit, it could be because of changes to RF since 6.1…
EDIT; Im making a bet that this is a bug in allure. Attach File keyword works just fine and the screenshot can be downloaded from allure but the screenshot is not copied into data/attachments/ folder so that it doesn’t show in allure like this:
Same issue happens with allure generate --single-file
Next, when running allure serve, it prints out following:
Generating report to temp directory…
Report successfully generated to /var/folders/8t/p8j6rj4s0yl3vkqc_wcc19wh0000gn/T/17798986160415926529/allure-report
Starting web server…
2025-02-14 12:34:51.683:INFO::main: Logging initialized @879ms to org.eclipse.jetty.util.log.StdErrLog
Server started at http://127.0.0.1:49467/. Press <Ctrl+C> to exit
If copy the missing image into /var/folders/8t/p8j6rj4s0yl3vkqc_wcc19wh0000gn/data/attachments, screenshot is shown: