Reports

This section will take you through the description of the report format. It will help you adjust your template to certain project roles or artefact types, and define which charts, tables, highlights and other data can be included in a Squore report.

Each model in the Squore Configuration can define a set of reports in <SQUORE_HOME>/Configuration/models/MyModel/Reports/Bundle.xml.

Here is an example configuration file for one report in Bundle.xml:

<?xml version="1.0" encoding="UTF-8"?>
<Bundle xmlns:xi="http://www.w3.org/2001/XInclude">
	<Report id="DR_DASHBOARD_REPORT" templatePath="../../Shared/Reports/templates/template_critical_software.jrxml" onArtefactTypes="APPLICATION">
		<Charts displayComments="false">
			<xi:include href="../../Shared/Analysis/key_performance_indicator_dynamic.xml" />
			<xi:include href="../../software_analytics/Dashboards/technical_debt/stacked_technical_debt_trend.xml" />
			<xi:include href="../../software_analytics/Dashboards/complexity_treemap_function.xml" />
			<xi:include href="../../software_analytics/Dashboards/test_coverage_graph.xml" />
			<xi:include href="../../software_analytics/Dashboards/coverage_treemap.xml" />
			<xi:include href="../../software_analytics/Dashboards/quality_kiviat_model.xml" />
		</Charts>
		<Tables>
			<xi:include href="../../Shared/Analysis/product_quality/code/complexity/dashboard/artefact_table/complexity_density.xml" />
			<xi:include href="../../software_analytics/Dashboards/complexity_volume_table.xml" />
			<xi:include href="../../software_analytics/Dashboards/test_coverage_threshold_table.xml" />
			<xi:include href="../../software_analytics/Dashboards/test_strategy_threshold_table.xml" />
			<xi:include href="../../Shared/Analysis/product_quality/code/standard_compliance/standard_compliance_table.xml" />
		</Tables>
		<Indicators ids="CPXT"/>
		<Measures ids="VG;TESTS;TESTS_FAILED"/>
		<Infos ids="BUILD_DESCRIPTION" />
		<Data>
			<Findings id="VIOLATIONS" />
			<Findings id="IMPROVED" type="IMPROVED_PRACTICE"/>
			<Findings id="DETERIORATED" type="DETERIORATED_PRACTICE"/>
			<FindingOccurrences id="FINDINGS" relaxationState="RELAXED"/>
			<Artefacts id="ARTEFACT" relaxationState="RELAXED"/>
		</Data>
		<SubData>
			<SubArtefacts id="COMPLEX_MODULES" artefactTypes="MODULES" orderByMeasure="VG" inverted="true" >
				<Where measureId="CPXT" dataBounds="[0.5;["/>
				<Measures ids="NCC_SUBSET;COMR;SLOC;ISSUE_BLOCKER;ISSUE_CRITICAL" />
				<Charts>
					<xi:include href="../../Shared/data_provider/squan_sources/dashboard/control_flow_graph.xml" />
					<xi:include href="../../software_analytics/Dashboards/issues_distribution_pie.xml" />
					<xi:include href="../../software_analytics/Dashboards/quality_kiviat.xml" />
				</Charts>
				<Tables>
					<xi:include href="../../software_analytics/Dashboards/table_complexity_module.xml" />
				</Tables>
			</SubArtefacts>
		</SubData>
	</Report>
</Bundle>

A Bundle is composed of one or more Report elements. Each Report is associated to a JasperReports template file (a file with a .jrxml extension) that defines the formatting of the final document. The attributes allowed for the Report element are the following:

  • id is the unique identifier.

  • templatePath is the path to the JasperReports XML template file.

  • onArtefactTypes (optional, default: any) is a semicolon-separated list of artefact types that this item applies to.

  • roles (optional, default: any) is a semicolon-separated list of project roles that are allowed to view and use this item.

  • groups (optional, default: any) is a semicolon-separated list of user groups that are allowed to view and use this item.

  • displayOnlyIf (optional) allows specifying a computation to evaluate whether to show the element. If the result of the computation is more than 0, then the element is displayed. Consult Expressions Syntax for more information about the supported computation syntax.

  • logo (optional, default none) is the path to the logo file.

  • availableFormats (optional, default: any) is a semicolon-separated list of document formats. Accepted values are PDF, PPTX and DOCX.

The parameters in a Bundle.xml file define the data that is exported and fed to the selected template file.

The template used throughout this manual supports all the documented features and is located in <SQUORE_HOME>/configuration/models/Shared/Reports/templates/template.jrxml.