Activate alerts

This section describes how to work with automatic notification alerts and actions to keep track of tests and test assets.

Alert rules

You can keep track of your tests as you perform your testing process by setting up email alert notifications. You can instruct LoadRunner Enterprise to notify those responsible when a performance test starts, ends, or fails, if a timeslot is idle for a period of time, or a test host becomes non-operational. You can also set an alert action to release a timeslot after the timeslot has been idle for a specified period of time.

Note: Alerts notifications are inactive during LoadRunner Enterprise upgrades.

You can activate the following alert notifications and actions:

Alert/Action Description
Test started

Sends an alert notification to the specified users when a test starts.

Enable this alert from Tests > Test Start.

Test finished

Sends an alert notification to the specified users when a test’s state changes from Running to any state, except for collate or analyze.

Enable this alert from Tests > Test Finish.

Test failed

Sends an alert notification to the specified users if a test fails.

Enable this alert from Tests > Test Failure.

Idle timeslot

Sends an alert notification to the specified users if the timeslot is idle for <x> minutes.

Enable this alert from Timeslots > Send email if timeslot is idle for X minutes.

Release timeslot

Releases the timeslot after the timeslot has been idle for <x> minutes.

Enable this action from Timeslots > Release timeslot if idle for X minutes.

Hosts are non-operational

Sends an alert notification containing the host name and tenant ID to the specified users when test hosts become non-operational as a result of host status being manually changed to Non-Operational in LoadRunner Enterprise, or if a host becomes non-operational during a Check Host maintenance task.

Enable this alert from Host Availability > Host becomes Non-Operational.

Back to top

Set alert rules

To activate alerts or notifications:

  1. In LoadRunner Enterprise Administration, select Configuration > Alerts.

  2. Click the Add Alert button , and enter a name and description (optional) for the alert.

  3. Select the alerts and/or the release timeslot action you want to activate from the Tests, Timeslots, and Host Availability tabs in the Alerts Template. For details, see Alert rules.

    • For test, timeslot, and host availability alerts:

      • Select the alert recipients: Owner, Administrator, and/or Other users. Use a comma (,) or semi-colon (;) to separate multiple email recipient addresses.

      • Enter an email subject line (Title) and alert notification text.

    • For timeslot alerts and the release timeslot action, enter the amount of time to wait before sending notification that the timeslot is idle, and before releasing the timeslot.

  4. Select the Assign Projects tab and click the Assign Projects button . Select the projects to assign to the alert in the Assign Projects to Alert dialog box, and click Assign. Projects associated with the alert are listed in the grid.

    To unassign projects from an alert, select the projects to unassign in the Assign Projects grid, and click the Unassign button .

  5. Click Save to save the alert template.

  6. Use the Filter to display only those alerts that meet the criteria that you define. For details see Filter displayed items.

    Note: For short tests (between 1-2 minutes), no statistics are displayed in the email alert.

Back to top

Create custom email alert templates

You can create customized alert templates to alter the content and format of alert messages. By default, LoadRunner Enterprise uses built-in templates to generate alert messages for the different alert types.

You can create your own template by making a copy of an existing template, and customizing it by adding or removing text, changing the order of text or property variables that are included in the template, selecting a different image, and modifying the position of each element in the page.

Custom alert templates are also supported in multi-tenant environments. For details on enabling them in multi-tenant environment, see Alerts in a multi-tenant environment.

To configure custom templates in email alerts:

  1. Create a custom template for the alert type: Tests, Timeslots, and/or Host Availability.

    You can use the default templates below as a basis for creating a custom template, and modify the layout and content as required. Save the template as an HTML file.

  2. Go to the <LRE_server_installdir>\dat folder, and create a folder named templates. Copy the custom alert template to the templates folder.

  3. Add the custom template to the configuration file.

    1. Open the PCAlertsSvc.exe.config file located in the LoadRunner Enterprise\LRE_ALERTS folder.

    2. Search for the Custom Alert mail teplate section, and uncomment the template type that you want to use.

      Copy code
      <!-- Custom Alert mail template -->
      <!--<add key="Mail.Template.Test" value="dat/templates/AlertTest.html"/>-->
      <!--<add key="Mail.Template.Test.{tenant-guid}" value="dat/templates/AlertTest.{tenant-guid}.html"/>-->
      <!--<add key="Mail.Timeslot.Test" value="dat/templates/AlertTimeslot.html"/>-->
      <!--<add key="Mail.Timeslot.Test.{tenant-guid}" value="dat/templates/AlertTimeslot.{tenant-guid}.html"/>-->
      <!--<add key="Mail.HostAvailability.Test" value="dat/templates/AlertHostAvailability.html"/>-->
      <!--<add key="Mail.HostAvailability.Test.{tenant-guid}" value="dat/templates/AlertHostAvailability.{tenant-guid}.html"/>-->
    3. Enter the path to your template file.

      Copy code
      <!-- Custom Alert mail template -->
      <add key="Mail.Template.Test" value="dat/templates/Mail.Test.html"/>

       

      If you are using a multi-tenant environment, you need to add the tenant UID for each tenant and provide a different template name:

      Copy code
      <!-- Custom Alert mail template -->
      <add key="Mail.Template.Test" value="dat/templates/Mail.Test.html"/>
      <add key="Mail.Template.Test.2e1b52fc-df12-44ed-94d4-f66f96fcc7c9" value="dat/templates/Mail.Test.2e1b52fc-df12-44ed-94d4-f66f96fcc7c9.html"/>

Back to top

Alerts in a multi-tenant environment

To enable alerts to work in a multi-tenant environment:

  1. Open the tenants.json file located in the <LRE_server_installdir>\dat folder.

  2. Copy the Tenant Unique IDs from LoadRunner Enterprise or the Site Management console, and paste them into the tenants.json file in the following format:

    Copy code
    {
    "tenants": [
    { "id": "fa128c06-5436-413d-9cfa-9f04bb738df3" },
    { "id": "<GUID>" },
    { "id": "<GUID>" }
    ]
    }

    Where <GUID> is a tenant unique ID which is taken from the Tenants page in the Site Management console. For details, see Manage tenants.

  3. Restart the LoadRunner Alerts Service.

Back to top

Delete alerts

You can delete alerts from the alerts grid by selecting the alerts you want to delete and clicking the Delete Alerts button . Click Delete to confirm. The selected alerts are removed from the grid.

You can also delete an alert from the alert's details page. To do this, select an alert by clicking the link in the Template Name column to open the alert details page. Click the More Options button and select Delete Alert.

Back to top