Report Template Reference

Document created by Chris Sommerstad Employee on Jul 22, 2017Last modified by Dave Murphy on Sep 28, 2017
Version 3Show Document
  • View in full screen mode

The Report Template Reference presents the necessary syntax to create CloudTest report templates using Microsoft Word.

CloudTest report templates are written in either:

  • DOCX format, which is also known as the "Office Open XML" format, and is available in Word 2007 or later versions
  • HTML format (requires SOASTA 53 or later)

Default templates for both formats are found in Central > Report Templates. Template files can be downloaded via the lower panel.

The tags used in the DOCX and HTML version of CloudTest's template language are interchangeable—DOCX uses the curly brackets rather than HTML tags—with only one exception:

The "toc-targets" attribute of the "begin-for-each-result" isn't applicable to the HTML template and will be ignored. This attribute is used to update the Word TOC, which isn't applicable to HTML templates.

Note: For all tags below, the equivalent HTML syntax can be used. Substitute < and > for Word's curly braces. As noted above, HTML reports are available only in SOASTA 53 or later.

Refer to Creating Report Templates and Reports for general instructions about report templates, including download, upload (e.g. of revised templates), and report creation.

report Tag Structure

The tag structures presented in the following sections are case insensitive.

  1. A single tag is contained within a single paragraph.
  2. If the tag takes a parameter, there is a required colon separator. Spacing around the colon is not important.
  3. Similar to the ISSE format, tags must start with {%% and end with %%}.

The supported report template tags fall into four main categories:

Additional instructions are provided to include monitoring or external data widgets in a report template.

Widget Image Capture

Widget image capture includes the ability to specify attributes to capture (e.g. color, custom name, etc.), as well as the to specify report flow control via no-duplication and for-each statements.

The tag structure below is used to capture specified single, combined, or correlated charts. For a complete list see Widget Type > Charts List.

Tag structure:

{%% widget-image : WidgetName %%}

Note: When specifying the widget name, you may optionally specify the absolute path to that widget. If you do not specify the CloudTest Library path, it is assumed the widget resides in /System Objects/Widgets.

Specifying Widget Settings

begin-widget-settings : To begin specifying widget settings, include the "begin-widget-settings" tag:

{%% begin-widget-settings %%}

After the begin-widget-settings tag, you can specify any of the following setting tags:

name : This specifies a custom name that will be used in the title bar.

{%% name : My Custom Widget Name %%}

color : This specifies a color to use in the widget title bar. The color must be specified in HTML hex color notation (the prefix hash mark is optional).

{%% color : #232323 %%}

theme : This specifies the theme to be used in a chart capture. See the dashboard UI for the full list of themes with colors.

{%% theme : Evolution %%}

Optionally, if you wish to start with a particular color offset in the theme, you can specify the offset by number:

{%% theme : Evolution : 3 %%}

show-x-axis : This boolean value specifies whether or not to show the vertical X-Axis grid lines in the chart image.

{%% show-x-axis : true | false %%}

height : You can specify an absolute pixel height for the widget image with this setting. {%% height : 200 %%}

split-dimensions : For chart widgets that support split dimensions, you can specify a single value, or comma-separated list of dimensions to split on.

{%% split-dimensions : Domain, Location %%}

end-widget-settings : Finally, after all the settings are specified, use the "end-widget-settings" tag to close the set:

{%% end-widget-settings %%}

The widget settings specified will apply to all following widget image captures (similarly to the settings for external data sources).

clear-widget-settings:To reset / clear the settings to the default set, use the "clear-widget-settings" tag:

{%% clear-widget-settings %%}

begin-no-duplication and end-no-duplication : Use no-duplication tag that can be used to wrap groups in "for-each-result" blocks. Any content inside the no-duplication tags will only be included in the first result, but not in any subsequent results:

{%% begin-no-duplication %%}


and

{%% end-no-duplication %%}

begin-for-each-result : When multiple results are selected to create a report, the template section is duplicated in the template via:

{%% begin-for-each-result : toc-targets %%}

Use begin-no-duplication in the for-each loop to wrap sections. Using the no-duplication tag in this way will suppress repeated information in all but the first section.

Optional Tag structure

widget-image : This optional tag designates the placeholder for any additional widgets that the user may select during report generation which are not in the template. The Additional Widgets tag needs to be in a result loop (e.g. for each result).

{%% widget-image : Additional Widgets %%}

Optional Tag structure:

{%% widget-image : All Monitored Charts %%}

The optional "All Monitored Charts" placeholder will substitute in all monitored charts for the result (e.g. all resources from any monitors that were enabled in the composition when it ran). The All Monitored Charts tag needs to be in a result loop (e.g. for each result).

Example Single Widget Image Capture Syntax

The following section presents the required syntax for single charts.

Single Charts

{%% widget-image : Average Response Time %%}
{%% widget-image : /MyFolder/MyWidgets/Hello World %%}

Example Combined and Correlated Widget Capture

Creating Combined and Correlated widgets is done via start and end tags, and listing each widget separately inside. The following sections present the required syntax for combined and correlated charts.

Combined Charts

To capture combined charts, first specify a start tag, followed by the widget-image(s) and an end tag:

{%% begin-combined-widget %%}
{%% widget-image : Virtual Users %%}
{%% widget-image : /my widgets/My Send Rate Widget %%}
{%% end-combined-widget %%}

Correlated Charts

{%% begin-correlated-widget %%}
{%% widget-image : Send Rate %%}
{%% widget-image : Receive Rate%%}
{%% end-correlated-widget %%}

Fundamentals Data Capture

As with any widget, you can capture a screenshot of the Fundamentals widget, however it may be useful to extract the actual textual data values instead, so that you can format and display the data however you choose. Using the fundamentals data tag, you can extract all pieces of data from the fundamentals widget.

Tag structure:

{%% fundamentals-data &colon; dataIdentifier %%}

Example Fundamentals Data Capture

{%% fundamentals-data &colon; errorCount %%}
{%% fundamentals-data &colon; avgResponseTime %%}

Possible Fundamentals data identifiers with example values in parenthesis:

  • elapsedTime  (00:02:55.67)
  • startTime  (11:54:23 am)
  • startDateTime  (Wed Sep 15 11:54:23 2010)
  • endDateTime  (Wed Sep 15 11:57:18 2010)
  • messageSendCount  (2,772)
  • messageCount  (2,772)
  • errorCount  (1,381)
  • errorPercentage  (49.82%)
  • scriptCount  (1,453)
  • errorScriptCount  (434)
  • errorScriptPercentage  (29.87%)
  • clipCount  (10)
  • currentClipCount  (0)
  • chainCount  (1,391)
  • pageCount  (12)
  • groupCount  (13)
  • resultStatus  (Completed)
  • resultSummary  (Composition completed)
  • resultDescription  (This description was set in the result)
  • resultName  (Result from Tue Aug 24 11:49:34 PDT 2010)
  • compositionName  (Simple 10 VU Test)
  • compositionSaveDetails  (true)
  • compositionDescription  (true)
  • compositionPreviewMode  (false)
  • avgResponseTime  (42) (this value is in milliseconds)
  • minResponseTime  (29) (this value is in milliseconds)
  • maxResponseTime  (481) (this value is in milliseconds)
  • bytesSent  (103 KB)
  • bytesReceived  (12 MB)
  • effectiveThroughputMsgsSec  (12) (this value is in msgs/sec)
  • effectiveThroughputBytesSec  (6,056) (this value is in bytes/sec)
  • effectiveThroughputBitsSec  (48,451) (this value is in bits/sec)
  • virtualUserCount  (10)
  • currentVirtualUserCount  (0)

General Text Capture

Text such as the customer name, test type, test date, and the logged-in user can be extracted to include with reports.

Tag structure:

{%% general-text : identifier %%}

Possible Text Identifiers

  • test type

The type of test the composition is set to, either "Load", "General" or "Custom". Refer to Play Mode and Results Logging for more information.

  • test date

The date of the majority of the selected results.

  • creator

The logged in user name.

User Input Capture

Tag Structure:

{%% user-input : Input Name %%}

This allows you to prompt for any arbitrary text from the user at report generation time. The user-supplied value will be inserted into the generated report at the tag location.

Flow Control

You can repeat an entire section for each result that is selected in the Create a New Report dialog.  You will need to wrap the section with start and end tags:

{%% begin-for-each-result %%} 

and

{%% end-for-each-result %%}

Using no-duplication tags

begin-no-duplication and end-no-duplication : Use no-duplication tag that can be used to wrap groups in "for-each-result" blocks. Any content inside the no-duplication tags will only be included in the first result, but not in any subsequent results:

{%% begin-no-duplication %%}


and

{%% end-no-duplication %%}

begin-for-each-result : When multiple results are selected to create a report, the template section is duplicated in the template via:

{%% begin-for-each-result : toc-targets %%}

Use begin-no-duplication in the for-each loop to wrap sections. Using the no-duplication tag in this way will suppress repeated information in all but the first section.

Adding External Data Source Widgets to a Report Template

External Data Sources widgets can be added to the report template for inclusion in reports.  To do so, it takes a couple tags.  The first required tag sets the external data source:

{%% set-external-data-source : /MyFolder/My CA Wily Server %%}

Then, all following external data source widgets will use that data source (a new one can be set at any time).

Declaring an External Data Source Widget

{%% external-data-source-widget-image : /demo/JBoss/JBoss Agent/CPU/Utilization % (process) %%}

The default path separator is slash.  If the path separator conflicts with a name in the path, a different path separator can be declared:

{%% set-external-data-source-path-separator : || %%}

This would change the path separator to "||". Specifying a widget would look like this:

{%% external-data-source-widget-image : ||demo||JBoss||JBoss Agent||CPU||Utilization % (process) %%}

External data source widgets can be combined with other widgets using the same combination syntax above.  Here's an example of combining an external data source widget with Avg Response Time:

{%% begin-combined-widget %%}
{%% widget-image : Average Response Time %%}
{%% set-external-data-source : /MyFolder/My CA Wily Server %%}
{%% external-data-source-widget-image : /demo/JBoss/JBoss Agent/CPU/Utilization % (process) %%}
{%% end-combined-widget %%}

Attachments

    Outcomes