Test, Customizing HTML reports - epam/Gepard GitHub Wiki

Customizing the HTML log is just a matter of creating a few templates. Templates are searched in the path defined by gepard.result.template.path property.

All templates consist of sections and variables to be substituted:

<!--Start of ThisIsTheSectionName-->
... something ... %variable% ... something ...
<!--End of ThisIsTheSectionName-->

This is a very basic template system: in the current implementation sections cannot be nested, there is no support for conditions, loops or anything else beyond variable substitution. The Logger class is responsible for reading and analyzing a template, replacing %variable% notations with values, and writing the result into a log file.

Although HTML comments are used to specify section boundaries templates are not restricted to HTML format. You can produce XML, CSV or any other text-based log file if you want.

Please note that you cannot change section or variable names, they are hardcoded into the generic classes that create the logs, but variables can be left out, or new ones can be added if they are defined in a property file loaded by the Environment class.

After you created the template files, modify or override the gepard.result.template.path property of the build script to specify the new location of the template files. See the default templates provided with the framework for more information about variable names that currently some value when a specific template is processed (located in templates folder in gepard-core.jar).