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

Not able to generate pdf report for selenium java maven testng framework #44

Open
Sai7574 opened this issue Sep 13, 2023 · 13 comments
Open

Comments

@Sai7574
Copy link

Sai7574 commented Sep 13, 2023

C:\Users\niranjan.pa\Downloads>allure-docx --pdf C:\WF\AllurereportingSeleniumTestNG\AllurereportingSeleniumTestNG\AllurereportingSeleniumTestNG\allure-results allure.docx
Template: C:\Users\niranjan.pa\AppData\Local\Temp_MEI222082\template.docx
Traceback (most recent call last):
File "allure_docx\commandline.py", line 74, in
File "lib\site-packages\click\core.py", line 722, in call
File "lib\site-packages\click\core.py", line 697, in main
File "lib\site-packages\click\core.py", line 895, in invoke
File "lib\site-packages\click\core.py", line 535, in invoke
File "allure_docx\commandline.py", line 51, in main
File "allure_docx\process.py", line 300, in run
File "allure_docx\process.py", line 95, in build_data
KeyError: 'status'
[16892] Failed to execute script commandline

can u help out me?
Screenshot (7)

@bjarnesc
Copy link

It seems some of your test results don't have a status (e.g. successful, failed), which seems rather odd. The library was only tested with java junit and python pytest, so this might have to do with TestNG, but I cannot be sure. If you could provide the json test rusult data I could look over it.

@Sai7574
Copy link
Author

Sai7574 commented Sep 26, 2023 via email

@bjarnesc
Copy link

bjarnesc commented Oct 2, 2023

Alright. I cannot see any shared files though.

@Sai7574
Copy link
Author

Sai7574 commented Oct 2, 2023 via email

@Sai7574
Copy link
Author

Sai7574 commented Oct 9, 2023

allure-results.zip

@bjarnesc
Copy link

bjarnesc commented Oct 9, 2023

It seems the "testCaseId" that is used is a parameter usually only used by allure test ops (see https://allurereport.org/docs/how-it-works/test-result-file/) and probably not mandatory. I exchanged it for "fullName", which should work. Please checkout and use https://github.com/bjarnesc/allure-docx/ while the merge request is being processed, as I do not have access rights for this repo.

Please give feedback if it does.

@Sai7574
Copy link
Author

Sai7574 commented Oct 9, 2023

There is no latest version v0.4.1 can u help out where can I find?

@bjarnesc
Copy link

bjarnesc commented Oct 11, 2023

There is no latest version v0.4.1 can u help out where can I find?

Simply install with pip from source

pip install allure-docx@git+https://github.com/bjarnesc/allure-docx.git#egg=allure_docx-0.4.1

@Sai7574
Copy link
Author

Sai7574 commented Oct 14, 2023

image
allure.docx

PDF:
image
image
allure.pdf

It is Generating in word Doc file and pdf format but pdf is not opening and screenshots are not displaying in word Doc can u check from your end also I have forwarded for u allure results zip Plz check and let me know thanks for helping out me Appreciate u r effort. First one is Word Doc File and Second One is Pdf File

@bjarnesc
Copy link

bjarnesc commented Oct 17, 2023

This seems to be because your attachment files do not have a proper type ending. Rename them to .png files (and update the attachement path inside the tests obviously). Then it should work.

This is a problem with Word as it does not seem to be able to process attachements without type ending.

@Sai7574
Copy link
Author

Sai7574 commented Nov 30, 2023

When iam generating allure results in that screen shot has file type and it is not having .png format and .png format is not generating in allure-results folder can u help on it thanks

@bjarnesc
Copy link

bjarnesc commented Dec 5, 2023

When iam generating allure results in that screen shot has file type and it is not having .png format and .png format is not generating in allure-results folder can u help on it thanks

I really tried but I cannot understand your sentence. Please try to use some grammar that makes sense.

@Sai7574
Copy link
Author

Sai7574 commented Dec 8, 2023

I am generating allure results in that screenshot, but the file type is not.png, and the.png format is not creating in the allure-results folder. Could you please assist? Thank you.

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

No branches or pull requests

2 participants