Creating JIRA Issues from QuerySurge Email Notifications
Displaying failed QuerySurge executions as Issues within JIRA requires preparation on both sides:
- A designated email address needs to be identified or configured for QuerySurge to send emails to, and for JIRA to retrieve them from.
- At least one QuerySurge email notification must be configured for failed executions.
- JIRA must be configured to retrieve new mail from the designated email address
- JIRA must be configured to convert qualifying email into a pre-selected Issue Type.
Note: This guide is mostly comprised of JIRA instructions. Instructions on the setup of QuerySurge email notifications can be found in this Knowledge Base article.
Configuring JIRA Mail Server
Once QuerySurge is set up to send out email notifications, JIRA must be configured to receive and store mail from the designated address. For this, a Mail Server is used.
Log into JIRA, and navigate to the Incoming Mail page located at: Settings () -> System -> Incoming Mail
Click the "Add POP /IMAP mail server" button.
In this example, we illustrate with Gmail; you may have to obtain the proper values for this from an email admin in your organization.
Name the mail server and choose the protocol used by the mail service provided. Gmail uses SECURE_POP (port 995). Then, input the credentials of the destination email address. In this case, the mail server address is the same as the QuerySurge notification email address.
Setup JIRA Mail Handler
Once JIRA is setup to retrieve emails from the designated address, create a Mail Handler to filter Issue candidates from the emails received by the account. Using the FROM email address, the Mail Handler determines whether it qualifies for conversion into a JIRA Issue (bug, story, task, etc).
Navigate to Incoming Mail page located at: Settings () -> System -> Incoming Mail
Click the "Add incoming mail handler" button.
Name the mail handler and choose the mail server to read from.
Optionally, the Delay can be set. This determines how frequently the mail handler checks the mail received by the designated email account.
Lastly, choose the Handler type. In our case, because every QuerySurge notification will be related to a different execution, we chose "Create a new issue or add a comment". Any replies to these emails will be treated as comments to the main Issue created.
In the following screen, select the JIRA project new Issues should be submitted under. Then specify the Issue Type to use. Typically, when using JIRA to report test failures in QuerySurge, the "Bug" type is used.
If a Catch Email Address is specified, the mail handler will only convert emails with the specified email address in its To, Cc, or Bcc lists.
Before saving the mail handler, a Default Reporter must be specified. This is the user name under which the Issues will be created ("Reported").
Note: There are other optional fields that go beyond the scope of this guide. For more information on mail handler creation, visit Atlassian's JIRA Documentation.
Using the setup described above, the following JIRA Issue (Bug) was created after the failure of a Scenario execution through the default notification, "Default: Scenario Did Not Pass".
Note that the email subject is used as the Bug title while its body is used as the bug description: