The program which compiles the built-in reports (both HTML and PDF) is not customizable at all. You are wasting your time. I would recommend you to abandon your idea.
I would explain by code what I stated above. The com.kms.katalon.core.reporting.ReportUtil is the program that compiles the reports. You can find the full souce code in the <Katalon Studio installed folder>/Contents/Eclipse/configuration/resources/source/com.kms.katalon.core/com.kms.katalon.core-sources.jar file.
It enables you to compile a test report using the Extent Reports. It is open-sourced, is free to use.
By the way, Katalon offers a Plugin “Extent Reports integration”:
The integration plugin is priced. If you have an Katalon Studio Eterprise license, it will help you a lot.
If you don’t have an Enterprise license, and if you are a skilled Java programmer, you would be able to re-invent the plugin for yourself. It would be a fun.
I found a GitHub repository that contains a Katalon Studio project with some sample codes that work with Extent Reports:
This project is licensed under the MIT License.
This project seems to work with Katalon Studio Free v10.1.0. I cloned the repository; I amended the project a bit (I found a compile error, but I could easily fix it); I could run it successfully. I got a report like this.
By the way, what is the relationship between the Extent Reports integration plugin and the Extent Report sample project? These 2 projects share a single class named com.katalon.extent.report.ExtentReport. I’m confused.
I guess, Katalon started with the the Extent Report sample project on GitHub, but one day (five months ago) they decided to stop maintaining it for free; they transfered the code base to their private repository, published the priced “Integration plugin”. Possibly, they will maintain only the “Integration plugin” in future. ---- This is just my guess. I don’t know the true history.
On the other hand, the changelog of the plugin tells me that Katalon has made serveral updates to the plugin recently. They will continue updating the plugin in future.
Now I’ve got a doubt. Let me assume I get an Enterprise license and apply the Extent Report integration plugin. And let me assume I have made the aforemention amendment to the com.katalon.extent.report.ExtentReport class.
What will happen if the plugin is updated in future, and if I pull the updated plugin version?
Will the Groovy source of the com.katalon.extent.report.ExtentReport be
overwritten by the updated plugin version.
perform line-by-line merging
???
I don’t know. I guess the case.1 is likely. The case2 is unlikely.
In the case1, I would loose any changes that I made in the source. In other words, the Extent-Report-Integration plugin does not allow me to customize it.
I think that it is a poor idea for me to edit the source of com.katalon.extent.report.ExtentReport class which is originated by Katalon. I need to find out some alternative coding trick.