How to export the test results to a PDF through script
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to export the test results to a PDF through script
Hi,
Can anyone please guide me with a sample script to export the test result to a PDF file in TestComplete. I know the manual process to do so, suggested in https://support.smartbear.com/testcomplete/docs/testing-with/log/working-with/exporting/to-pdf.html, but I want to do that through scripting.
Thank you
Solved! Go to Solution.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Doesn't look like PDF is an option:
Marsha_R
[Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @KP13,
I agree with Marsha, at the moment, there is no built-in feature to export a PDF file from script. Only manual exporting is possible. Are there any specific requirements for exporting to PDF? TestComplete provides an easy export of test logs to an MHT file. In this case, all information will be stored in one file and it's easy to share it.
Tanya Yatskovskaya
SmartBear Community and Education Manager
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Marsha_R.
Yes. Currently, we are using the similar type of Python script to save the TestComplete report as a html file.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for your suggestion.
While exporting the logs to a PDF file manually, it's looking nice to me. I was looking for a single file. But as it is not possible to get PDF through scripting, I will export the test logs to a .MHT file.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
If export to .mht works for you then it's nice. Note, that .mht file can be opened in IE browser only, but not in Chrome and Firefox.
If you still like to have .pdf...
As an idea: You may
-- export log to .mht or a set of .html files, then
-- start separate instance of IE (through the COM to make IE not displayed on the screen, though this is optional), then
-- open exported log in IE and
-- print to .pdf via code.
-- Use generated .pdf and do cleanup for the exported log and IE instance.
Note: I do not expect that this printed .pdf will be of significant help because of absent screenshots, missed contents of the Additional Info log pane, etc.
/Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@TanyaYatskovska isn't there an open feature request for test log export to pdf?
i know that a lot of folks are interested in the ability to export test logs to pdf from code, and i think i remember seeing this requested in the past but cannot find the feature request list.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@dbattaglia Feature requests is the last forum on the main page here:
https://community.smartbear.com/t5/TestComplete/ct-p/TestComplete_forum
Marsha_R
[Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
