You can customize reports by configuring the settings in the .properties file (see Configuration Overview). This section describes examples of how your reports can be configured. See Report Settings for a complete list of settings that allow you to customize your reports to your needs.
Specifying Report Output Location
You can configure the location of reports with the report.location
property. For example:
report.location=[path/to/location]
Alternatively, you can specify the output directory for reports with the -report
switch. For example:
dottestcli.exe -solution "C:\Devel\FooSolution\FooSolution.sln" -config "builtin://Demo" -report "C:\Report"
Specifying Report Format
By default, an HTML report is generated. You can generate a PDF report or a report with a custom extension to the specified directory by setting the report.format
property. For example:
report.format=pdf
Support for Custom Report Formats
You can customize locally-generated and emailed reports by building a custom XSL transformation that specifies how you want the results formatted. For instance, you could use a custom transformation to map data into the format you need to demonstrate compliance to an internal security policy.
To specify a custom report format, you need to:
- Create an XSL file that specifies how you want to transform the XML data.
- Specify the location of the XSL file, as well as the extension that should be assigned to the resulting file by configuring the following settings in your .properties file:
report.format=custom
report.custom.xsl.file=<full path to the XSL file>
report.custom.extension=<extension of the resulting file>
If you perform analysis from your IDE, you can specify the the location of the XSL file and the extension of the resulting file on the Reports preference page; see Generating Reports.
Available Parameters
The following parameters can be used in custom XSL files:
Parameter | Notes |
---|---|
report_type=disk_report|email_report | Determines if the generated report will be sent by email or saved on the local disk drive. |
test_params | The command line that was used to start the product that generated this report. Example: dottest: -config dtp://xtest-static.properties -localsettings /home/nightly/localsettings.properties -publish -report /home/nightly/reports/report.html -resource myproject -dtp.autoconfig [email protected]:8443 |
test_config_name | The name of the test configuration that was executed to produce this report. |
output_dir=[dir] | The directory where the report is created. This can be used to generate developer reports. Example: <xsl:value-of select="concat($output_dir,$dev_reports_prefix,$authid,'.csv')"/> |
rules_dir_path=[path] | The directory where rules documentation is saved. This can be used to generate rule popups/links. Example: <xsl:value-of select="concat('javascript:openWin(',$qt,$rules_dir_path,$id,'.html',$qt,')')"/> |
suppr_msgs=true|false | The value of the report.suppressed_msgs option. See Report Settings for details. |
dev_errors=true|false | The value of the report.developer_errors option. See Report Settings for details. |
dev_reports=true|false | The value of the report.developer_report s option. See Report Settings for details. |
show_active_rules=true|false | The value of the report.active_rules option. See Report Settings for details. |
associations=true|false | The value of the report.associations option. See Report Settings for details. |
dev_reports_prefix=[prefix] | The prefix used to name developer reports. Example: <xsl:value-of select="concat($output_dir,$dev_reports_prefix,$authid,'.csv')"/> |
attachments=true|false | The value of the report.mail.attachments option. See Report Settings for details. |
authors_details=true|false | The value of the report.authors_details option. See Report Settings for details. |
contexts_details=true|false | The value of the report.contexts_details option. See Report Settings for details. |
Customizing XSL Files Used to Generate Reports
You can customize any of the intermediate XSL transformation files used to generate reports in all available formats as an alternative to building a custom XSL transformation from scratch. These XSL files are located in the etc/xsl
directory within the installation directory. You have two options:
- Modify the file(s) you want to customize directly in the default directory:
etc/xsl
. - Copy the file(s) you want to customize to another directory and modify them there. To use this directory before the default one for report generation, specify its path using the
report.xsl.dir.user
setting.
Report Formats
The following table describes the supported report formats and lists the names of the generated report files in each format:
Report Format | Description | File Name |
---|---|---|
HTML | (Default) A report in the HTML format containing all results supported by dotTEST. | report.html |
A report in the PDF format containing all results supported by dotTEST. The report is generated based on an HTML report. | report.pdf | |
CSV | A report in the CSV format containing static analysis results. | report.csv |
XSL custom | A report in a custom format containing results processed by a custom user XSL transformation. All results supported by dotTEST can be included; see Support for Custom Report Formats for details. | report_custom.xml report_custom.html |
JSON SARIF (Static Analysis Results Interchange Format) | A report containing static analysis results according to the SARIF specification; see https://sarifweb.azurewebsites.net/ for details. | report.sarif |
JSON SARIF for Azure DevOps | An Azure DevOps-specific report containing static analysis results according to the SARIF specification; see https://sarifweb.azurewebsites.net/ for details. | report_azure.sarif |
JSON SAST for GitLab | A GitLab-specific report containing static analysis results according to the SAST specification; see https://docs.gitlab.com/user/application_security/sast/ for details. | report.sast |
XML SATE (Static Analysis Tool Exposition) | A report containing static analysis results according to the SATE specification; see https://samate.nist.gov/SATE4.html for details. | report_sate.xml |
XML xUnit | A report in the xUnit format containing unit test results. | report_xunit.xml |
You can customize the report file name, using the report.file.name setting.