Alert Email-Templates

Table of Contents

An alert that sends an email uses a template to render the actual email.

Subject

Enter the subject-line that is used in the alert-email. It may contain any of the placeholders that are documented below.

Body

Enter the emails body either as HTML or as Plaintext into the body-field. You may use any of the placeholders that are documented below.

Placeholders

In the Email-subject or -body you can use placeholders to dynamically fill-in values from the alert-context. BiG EVAL uses the handlebars-syntax.

Placholders or control-instructions are always written between two opening curly brackets and two closing curly brackets.

The following example shows how to use the ID and the name of the testcase within a H1-tag.

<h1>{{Test.TestId}} - {{Test.Name}}</h1>

The result of this template may look like following:

<h1>123 - Mein Testfall</h1> 

Formatting Date and Time values

Some of the variables/properties provided by the alert-context are DateTime-types. If you don’t use any special formatting-instructions (documented below), it will be rendered as UTC.

Example in UTC:

<p>{{Run.StartedAt}}</p>

Formatting Date and Time in UTC may not be very user-friendly depending on the situation. That’s why we provide some helper-extensions for handlebar.

HelperDescriptionExample
UtcToServerTimeConverts a UTC based DateTime value into the TimeZone of the server using the default-regional-settings of the server.{{UtcToServerTime Run.StartedAt}}
UtcToServerTimeConverts a UTC based DateTime value into the TimeZone of the server and formats it in a specific format using the default-regional-settings of the server.{{UtcToServerTime Run.StartedAt 'G'}}
UtcToServerTimeConverts a UTC based DateTime value into the TimeZone of the server and formats it in a specific format using the specified regional-settings.{{UtcToServerTime Run.StartedAt 'G' 'en-us'}}

Formatting Numeric Values

Format numeric values using the following handlebar-helpers.

HelperDescriptionExample
FormatFormats a value using standard numeric format strings or userdefined format strings using the regional-settings of the BiG EVAL server.{{Format Statistics.ExecutedCount 'G'}}
or
{{Format Statistics.ExecutedCount '#0.00'}}
FormatFormats a value using standard numeric format strings or userdefined format strings using specified regional-setting.{{Format Statistics.ExecutedCount 'G' 'en-us'}}