-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Part of the original GSOC project is to create a way to generate reports for compliance utilities, to take the output from the compliance suite and to emit a report. This input should be an intermediate format i.e. not generated directly from the TestNG framework to allow alternative compliance reporters to generate a report. JSON would be a suitable way to communicate this.
See below for more information on the current refget implementation.
Refget has a report generating mechanism written in Jekyll, a static site generator which GitHub pages can generate a fresh HTML site with for every commit to a repository. Refget compliance currently runs tests nightly and pushes the new JSON dumps its current JSON representation of a test report into a HTML report. The main components used are:
- The default layout (defines injection of any file which uses this layout using
{{ content }} - The report layout, which extends the default layout
- The index of the site, which uses the default layout
- An individual report, which uses the report layout but only defines front-matter (metadata for the page made available in the
pagevariable) - The
_datadirectory and holds json and yaml files. All of these elements are available across the entire Jekyll site under thesite.dataparameter as the file name without extension e.g.site.data.descriptions
Jekyll takes all markdown and HTML files, passes it through a pre-processor with liquid tags injected to generate dynamic content and writes out a file (this can be any format but normally it's HTML). In addition Jekyll supports SASS or SCSS if you want to use CSS but in one of the alternative frameworks. Jekyll also does pre-processing of each file to look for the front-matter, a YAML payload at the top of each file to be processed, and injects it into the page variable. Note because this is YAML you can define any kind of data structure but you cannot dynamically set the variables here because they are processed before the liquid templates are processed.