How to add Customize Description Message for each iteration into Report PDF ?

Hi,

i am looking for a way to Add a Custom Description Message For each iteration into a PDF Report,
let’s just say I have an example like this inside my test case :

for(int i=1; i<=5; i++){
WebUI.comment(‘This is my ’ + i + ’ Iteration’)
/*
do something just say take screenshot
*/
}

so I was expecting something like this :

for(int i=1; i<=5; i++){

This is my 1 Iteration
ScreenShot image
This is my 2 Iteration
ScreenShot image
This is my 3 Iteration
ScreenShot image
This is my 4 Iteration
ScreenShot image
This is my 5 Iteration
ScreenShot image

we can see each step in detail on the HTML format of the exported report but I can’t find a way to do it for the PDF format because all the processes inside the loop will be combined and treated as a single process.
in HTML Format
image

in PDF Format
image

i have tried KeywordUtil.logInfo(‘Message’) and WebUI.comment(‘Message’) and also test cases Description but no message showing in PDF.

1 Like

The built-in Report feature compiles a PDF that comprises with multiple pages.

But you are looking at only the first page.

You should look at the 2nd page and followings, there you will find the output of “comment()”.

The built-in Report feature provides no chance to customise the output. You have no way to change the PDF from the built-in Report.

Why do you want the report in PDF? Do you want to attach it to an email to your manager to report to him?

I think you do not need a PDF.

You can attach the reprt in HTML, which is a single *.html file which is self-contained; the report is NOT comprised with multiple files.

I would attach an example HTML generated by the built-in Report feature.
20221002_163852.html (10.1 MB)
Please download the file and just open it in a browser.

1 Like

thanks for answering my question @kazurayam, actually they prefer PDF format as it’s easier to read but they also want the details and if we run a loop for comments what we actually get is just the last comment printed on the PDF format report (potential Bug maybe).

HTML report formats from my perspective are very good, but from other perspective it would be quite confusing for common people to read the document because of a lot of detailed information.

It is a difficult task to develop a “report” that satisfies many people.

For any type of report, people tend to have their own tastes/requirements.

I personally hate a job of developing “reports” for many; I believe I would never be successful in that job.

1 Like

It seems that Katalon team is devoting their human resources into developing the report of the TestOps product. See, for example, Smart Test Reporting in Software Testing | Katalon TestOps

I guess that the basic Report feature in Katalon Studio Standalone product will be left as is.

1 Like

thank you very much @kazurayam
I hope the Katalon team can further develop the PDF format report as they have done with the HTML format, but I think I will have to give up on the build in report for the PDF format as I need some adjustments.

can we actually get the test raw data after we run the test suite, like how katalon do get the test raw data before they turn it into a report?
if it is possible then maybe we can make a separate program to convert the raw data into a report format that suits our needs.

1 Like

Yes, you can do it. See the following post where I explained what I did to compile my custom report.

honestly speaking, to produce a pdf from a certain html is only a matter of few clicks …

I do not agree with this comment.

Here is an HTML report generated by Katalon Studio.

20220922_141538-333703615.html (210.5 KB)

I converted this HTML into PDF by a few clicks …

20220922_141538-333703615.pdf (57.4 KB)

I do not see this PDF is equivalent to the original HTML.

What’s the difference? HTML has many interactable GUI components which I can expand/collapse by clicking.

On the other hand, a PDF isn’t interactible. I can not expand the plus mark :heavy_plus_sign: in the PDF by clicking. So in a PDF version I can only see a limited range of information presented with all GUI components collapsed. This PDF version is not equivalent to the original HTML of Katalon Report.

Possibly there would be a way to convert the HTML into a PDF with all :heavy_plus_sign: handles are expanded, but it would require special treatment. It would not be a matter of few clicks …

Ofcourse is not, the original pdf has only general info about execution (but a nice formatted sumary).
See atachment:
New Test Suite Test Log.pdf (68.8 KB)

However, on the html report, I clicked on top right on ‘Expand all’ and after Print > Save as pdf.
So this is what I got:
20221007_102928.pdf (3.8 KB)

Well … not sure how nice will work with larger reports … but, is few clicks :stuck_out_tongue:

On the other side … I really don’t see any added value into adding more ‘verbosity’ into the pdf one.
If you have to sent the report to your manager, sent the pdf as it is. Usually they are not interrested in details, only on overall status.

If you have to send the report to a developer or QA or any other engineer, send the html (and perhaps additional relevant logs).
Having reports as html you can also upload them on a centralized resource running a web server (to start an apache/nginx webserver on a decent linux machine is only a matter of docker run) and send the link to contributors.

I hope @daniel.ong is able to develop a program that meets his need.

I reviewed the original post by @daniel.ong and realized that he wanted to attach the screenshot images in the report.

HTML or PDF, that is not his primary problem.

@daniel

In this Katalon forum, many people have written that they wanted the built-in report to show the screenshot images. But their requirements have never been addressed.

You need to develop your own solution.

@daniel.ong

I would show you “my own report” as an example.


My previous project Visual Inspection in Katalon Studio - Reborn forcused on taking screenshots while navigating around pages of web sites, storing the images into files under a tailored file system, and compiling a report that shows screenshots with metadata.

The following URL shows an example of output report.

Please visit this and click around. You would see the page can show screenshot images rendered in a single HTML report. I suppose this demo page looks close to what you described above.


By a bit of twists, this report can present images in chronological order. I mean, the screenshots can be sorted by their timestamp. Also you can associate any metadata such as “comment” and “description” to each images, and all metadata of images will be rendered in the report.

The software works fine for me now. It took me several months to develop it. It was a tough task.

I published the source code of this project at GitHub. It is open-sourced. But I meant the program to be for my own use. I haven’t written enough documents yet; authoring documentations is much harder than developing codes for me. Therefore my project would be too difficult for you to reuse.

I realized that the ver 0.8.4 of “Visual Inspection in Katalon Studio - Reborn” project did not support sorting the entries in the report as specified. I told a lie. Sorry.

I have updated it to ver 0.10.3. This version supports sorting the entries as specified: