qTest Pulse Quick Start Guide

qTest Pulse is a workflow engine for products in the qTest Platform and is currently optimized to integrate BDD workflows for qTest Scenario-BDD for Jira. It works behind the scenes to integrate Jira software with Jenkins, Slack, and many different plug-ins to increase productivity within your development process.

For qTest SaaS customers, there is a payload size limit of 50MB.

Please note, Tricentis does not include an exception for calls made by Pulse in our API Gateway controls due to the open-ended nature of qTest Pulse's design. When the servers are under a period of high load, you may receive rate limit error messages, or 429s, from the qTest API during Pulse's regular operation. This is to ensure API stability. If you have any questions, please contact support@tricentis.com.

Prerequisites

Establish Pulse Access

Application permissions are granted using user groups. For more information about user groups, refer to User Groups. To access and edit Pulse, you will need access to the qTest Pulse Users user group. Contact your Site Administrator to arrange your user groups.

The default Administrators User Group will also have Pulse User permissions.

Add a User to the Pulse User Group

To give a qTest user access to qTest Pulse:

  1. In qTest Manager, click Administration on your username drop-down menu.

  2. Select the Groups tab.

    The User Groups page appears.

  3. In the System Generated Groups section, click the Action icon for the qTest Pulse Users user group. Then click Assign Users on the drop-down menu that appears.

    The Configure Group page appears.

  4. On the left side of the tab, search for the user that you want to add to the User Group.

    You can search for a user by name or email address.

  5. Select the check box next to the user's name, and then click the right arrow to move the user to the list of existing users in the User Group.

    You can also press the Tab key to select the right-arrow and the Enter key to move the user.
  6. Click Save.

Log in

Once your username has Pulse access, you can log in to qTest Pulse from the Product Navigator . Pulse opens in a separate browser window from your Manager instance.

Understand Pulse Rules

To properly integrate workflows, you need to establish and set up your Pulse Rules. These consist of Triggers and Actions. Triggers and Actions are basic conditional statements, an example of which is shown below:

  • If this trigger occurs, then I want Pulse to perform this action.

Pulse Rules are a combination of the following:

  • Triggers=webhooks

  • Actions=program code

  • Constants=static values used in the Actions

You will need to create the components above before you can begin creating your Pulse Rules.

Triggers (webhook)

A Trigger is a unique webhook produced by the application that will not only be used to create your Pulse Rule but will also be entered into the separate application tool for complete integration. Example: You want to create a Pulse Rule so that you receive a message from Slack when X, Y, or Z happens. You will create your Trigger, named 'SlackEvent', and the webhook URL that is produced by Pulse (in the Trigger section) will also be entered into your Slack application.

To create a Trigger:

  1. From the Pulse homepage, select the project where you want to create a Trigger.

  2. In the Trigger section, select the Create button.

  3. Enter a Trigger name in the Create Trigger dialog. Select Ok to save.

  4. Pulse will automatically generate a webhook.

    The Webhook URL will auto-populate with a unique value. If you are using an SSL configuration, the webhook produced will include https.
  5. You can view or delete the webhook by selecting the icon and both action options will appear.

    You cannot edit a Trigger.

So far, you have created the Trigger (webhook) that you will enter into the external application tool. Now, you need to enter the Pulse Action.

Actions (program code)

An Action is the program code that you want to execute as part of a Rule. Example: If you want to pass a payload to an action, you can send a message to any other tool with an available Due to the open-ended nature of qTest Pulse's design using JavaScript.

We have sample program code 'Actions' available, so you can begin setting up your Pulse application. These are available in the QAS public GitHub repository. There is also an Import/Export option available that will allow you to move your Pulse Rules from one project to another.

To Create an Action:

  1. In the Actions section, select Create to add a new Action. The New Action dialog opens.

  2. Name the Action. Be descriptive as to what the action is accomplishing.

    The name cannot be edited once created.
  3. (Optional) Provide a description.

  4. In the Program Code section, either enter the sample program code provided in the QAS Git repository or create your own actions.

    For the most up-to-date sample program code, view the Pulse Rules repository.
  5. The Available Constants section is 'display only' and populates values you have predefined in the Constants section.

    Declare any constants you call by entering the keyword const before the action to ensure code readability and prevent errors.

    For example, your code should look like this:

    exports.handler = function ({ event: body, constants, triggers }, context, callback) {
    const stepSdk = StepSdk.getStepSdk(constants.QTEST_TOKEN, constants.SCENARIO_PROJECT_ID, constants.Scenario_URL);
    }
  6. Select Save, and the Action will display in the Actions section of the screen.

  7. The Emit Event-Trigger Execution Chain provides details for the Trigger if you want to invoke another Trigger from your action code.

  8. The Catch code block will output any errors received when the action is executed to assist you with debugging.

Execution Information

Once an Action has been executed, you can view general execution information along with detailed execution logs.

  1. Select the Action icon to the right of the action for which you want to view the execution log.

  2. Select View Logs.

    The Executions dialog opens and displays general Execution information.

  3. Select the Id link for more detailed information such as the Payload, Standard Output, Standard Error, and the Response.

For the most up-to-date sample program code, view the Pulse Rules repository.

Constants

The Constants section is where you can create a list of Constants (name and value pairs) that are stored per project. These are accessible in your action code using the always available constants JSON object.

  1. In the Constants section, select Create to add a new Constant. The Create Constant dialog opens.

  2. Name the Constant, and select OK.

    Do not use spaces if the Constant name is more than one word. You can use only alphanumeric characters (or "$" or "_"), and the name may not start with a digit.

    If you misspell the name, you will have to delete the Constant, as there is no edit function.
  3. The newly created Constant name will display at the bottom of the list.

  4. In the red text field, enter the Constant value.

  5. The Constants entered here will be exported when you select the Export icon on the Pulse Rules page. These will export the name, but you will need to enter new values when exporting into a new project. Refer to Pulse Constants for more information on Pulse Constants that are used in the sample Pulse Rules.

  6. You can hide/unhide a Constant value, by selecting the action icon.

    • Hide: The value will display as asterisks.

    • Unhide: Once a value is hidden, you can unhide the value, but unhide will delete the value and you will need to enter a new one.

Refer to Pulse Constants for information on where you can locate the values.

Pulse Rules

  1. Log in to your qTest Manager application.

  2. Select the Pulse application from the Product Navigator .

  3. Select the appropriate Project in the project drop-down where you want to establish new Pulse Rules. The projects listed here are the same projects you will find in qTest Manager.

  4. The page will load and display the My Rules tab by default for the selected project.

Create a new Pulse Rule

It is best practice to not have two active rules with the same trigger but different actions. If multiple active rules have the same trigger, they will all be executed upon that trigger occurring. In order to avoid this, you will have to manually deactivate rules that use the same triggers. For instructions on how to do so, refer to Edit a Pulse Rule.
  1. In the Rules section, select Create.

  2. (Optional) Name the Rule and enter a Tag.

    An example Use Case for Tags is associating version numbers with a set of Rules.
  3. Select the Active check box to activate your Pulse Rule.

  4. Any Triggers you have created will display in the Trigger column. Drag the appropriate Trigger to the Rule column.

  5. Any Actions you have created will display in the Actions column. Drag the appropriate Action to the Perform column.

    You can only have one Trigger (webhook) per Rule, but you can assign multiple Actions to the one Trigger selected.
  6. Once finished, select the Create button at the bottom of the dialog.

Test and Execute a Pulse Rule

  1. Locate the Pulse rule you would like to test in the Rules section of the Pulse homepage.

  2. Select the play button icon in the Action column.

  3. The Run dialog opens. Select Execute.

  4. The Pulse Rule will kickoff in real-time and return a Response.

  5. You can view the response for Actions associated with the Pulse Rule.

  6. Select Close.

Edit a Pulse Rule

  1. From the Pulse homepage, select the project with the Pulse Rules you want to edit.

  2. In the Rules section, select the Rule Name hyperlink.

  3. The Edit Rule dialog opens, and you can drag/drop the Triggers or Actions you want to edit.

  4. To deactivate the Rule, select the Active check box to remove the check.

  5. Once finished, select Save at the bottom of the dialog.

Import/Export Pulse Rules

You have the ability to import and export Pulse Rules from one project to another. You can also export all of the Sample Pulse Rules provided by Tricentis that are located in the Pulse Rules repository in GitHub. You will then need to import these Rules into your own Pulse application/project.

For the most up-to-date sample program code, view the Pulse Rules repository.
  • Import: Creates a unique Event webhook for the new project.

  • Export: Includes constants' names, but you will need to enter your own values into the new project. New values will need to be entered each time you export rules from one project to another. Export is a .json file.

Access Sample Pulse Rules in GitHub

  1. Log in to your GitHub account and type 'PulseRules' in the GitHub search bar.

  2. Select the pulse-community repository that displays.

  3. The sample rules are available from the Code tab.

  4. Before you begin, read the 'README.md' file first. This is located in the Code tab as well. These instructions will assist you in using the supplied Pulse Rules Actions.

  5. You can view the Pulse Rules category of this User Guide for sample Rules/Actions. These are the same Rules/Actions you will find in the GitHub repository.

Sample Pulse Rules

Below are direct links to the sample Pulse Rules Actions (program code).