Creating Report Templates and Reports

by Community Manager on 07-06-2011 01:17 PM - last edited on 10-13-2011 02:58 PM

 


SOASTA Central includes a reporting facility, Central > Report Templates, which can be used to template, and then to export, usable test results into a Microsoft Word "docx" document. Report templates provide a format that places, and makes available for wider use, the charts that CloudTest uses to present test results.

Report Templates node

  • With Report Templates selected, click New to bring up the Import dialog box. Select the DOCX file to import.

Import dialog box

Once imported, the template file will appear in the list on the right.

When selected, details about the Report Template appear in the lower panel.

Creating a Report from Template

  1. To create a report based upon a template, first select one or more results from the Compositions list.
  2. Right-click to choose the Create a New Report command.

When you do so, the Create a New Report dialog box appears. The default widgets are automatically selected.

  1. Select an item in the Report Templates list (only one is shown below).
  2. Optionally, check or uncheck boxes in the Widgets reference in the selected template section of the Widgets list.
  3. Optionally, check additional widgets in the All other widgets section of the Widgets list.
  4. Click OK after making the necessary selections. The report is created and the browser download dialog box appears. Save the report for later viewing or choose the program with which to open it.

Note: If user prompts are present in the selected template, then the given fields will appear as well.

Report Template Reference

The following section presents the necessary syntax to create CloudTest report templates. When creating a Word doc to be used as a report template, you must use Word 2007 or newer "DOCX" format ("Office Open XML").

 

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 %%}.

Supported tags fall into four main categories:

  • Widget image captures
  • Fundamentals data
  • General text
  • User input
 

Widget Image Captures

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.

Optional Tag structure:

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

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).

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 : dataIdentifier %%}

Example Fundamentals Data Capture

{%% fundamentals-data : errorCount %%}
{%% fundamentals-data : 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)
  • 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

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 %%}

 

External Data Source Widgets

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 %%}