Skip to main content

Share test reports via email in Katalon Studio

requirements

An active Katalon Studio Enterprise license.

After a test suite or test suite collection execution, you might want to automatically send summary reports to your own email or other stakeholders to notify them about the test result. This document shows you how to set up your mail server and customize email reports to automatically send out a summary report email whenever a test execution finishes.

Email settings

In Katalon Studio, go to Project > Settings > Email to configure email server settings. You can also customize the email template and choose which types of report files to be sent as attachments, for example, HTML, CSV, PDF, Log, or PNG.

Email settings

By default, after you successfully set up your mail server, sender, and recipients, Katalon Studio sends all email reports for test suite executions, including test suites inside a test suite collection.

As an exclusive feature for Katalon Studio Enterprise, you have an option to keep your mailbox tidy by only sending email reports for test suite collection executions and skipping all emails for test suites stored inside that test suite collection. This option is useful when executing test suite collections containing many test suites.

Email settings

Mail server settings

Mail Server Settings define the mail server Katalon Studio uses for sending emails. To set up your mail server, you need to fill in your mail server host, port, credentials, and choose a protocol option.

  • Host and Port:

    • Host: The domain name of the mail server.
    • Port: The port to be used for that server.

    Below is a list of some common outgoing mail (SMTP) server configurations:

Email severHostPortReference
Gmailsmtp.gmail.com465 or 587Check Gmail through other email platforms
Outlooksmtp.office365.com587 or 25How to set up a multifunction device or application to send email using Microsoft 365 or Office 365
Yahoo! Mailsmtp.mail.yahoo.com465POP access settings and instructions for Yahoo Mail
  • Username and Password:

    • Username: Your full email account to authenticate with the server (e.g., yourusername@gmail.com)
    • Password: Your email password to authenticate with the server. This could be a password generated from App Passwords.

    For Gmail users:

    • If your email accounts are using two-step authentication, you can use Google App Passwords to set up a Gmail account in Katalon Studio. An App Password is a 16-digit passcode that gives Katalon Studio permission to access your Google Account. In the Select app dropdown of App Passwords, select the option Other (Custom name) to generate an app password for Katalon Studio. Then, use the generated passwords to put in the password section of Mail Server Settings. For details, see Google Account Help documentation: Sign in with App Passwords.
    • If you do not use two-step authentication, you can allow less secure apps to access your account. However, to help keep your account secure, starting May 30, 2022, ​​Google will no longer support the use of third-party apps or devices which ask you to sign in to your Google Account using only your username and password. For detail, see Google Account Help documentation: Less secure apps & your Google Account.

    For Yahoo! Mail, make sure to allow less secure apps to access your account. Follow this guide: Ways to securely access Yahoo Mail.

    As some SMTP servers do not require authentication and username in email address format, Katalon Studio does not validate usernames and passwords.

  • Protocol: The protocol to communicate with the mail server. There are three options:

    • None
    • SSL (Secure Sockets Layer)
    • TLS (Transport Layer Security)
  • Encrypt authentication data: For sensitive data protection, we recommend enabling Encrypt authentication data.

After you fill in your mail server information, you can send a test email to check if the mail server is set up correctly. Input an email in the Recipients field, then click Send Test Email. The Send test email button is only enabled once Mail Server Settings and Recipients are filled correctly.

send test email

Email template

You can define the sender, recipients (the list of emails to receive reports), email subject, and body template in this section.

Email Template and Report format

Katalon Studio supports adding Test Suite and Test Suite Collection names in your email subject with the placeholders ${suiteName} and ${suiteCollectionName}, respectively.

Report format

You can choose whether to include a test execution report as an email attachment. This includes selecting specific log files and configuring the report format (HTML, CSV, or PDF) to be attached.
notes
  • Ensure the Project > Settings > Plugins > Report > PDF option is explicitly enabled. Without this, a PDF report will not be attached to the email.
  • For an HTML report, when you enable the Attach reference images using linked screenshots (not embedded) to reduce report file size option in Project > Settings > Plugins > Report, only screenshots saved in the Reports folder are included in the report. If you want to save screenshots outside the Reports folder, do not select this option to avoid missing screenshots in your email report.

Body template

Customize email template for test suite

To customize the email body template used for a Test Suite, do one of the following:

  • Go to Project > Settings > Email > Template, then select Test Suite from the dropdown.

    Customize Test Suite email report from Test Suite settings
  • Or click Edit Template for Test Suite Execution from the Email Settings screen.

    Customize Test Suite email report from Email settings

The Test Suite email report template is displayed and is editable. Use the main navigation bar above the template, or click within the email body to reveal the quick edit menu.

Edit Test Suite email report using quick menu

Use the following supported variables to customize the content of the Test Suite email template:

VariableDescription
${hostName}Name of the host machine where the test was executed.
${os}Operating system used during test execution.
${browser}Browser name and version used (for Web tests).
${deviceId}ID of the device used for test execution.
${deviceName}Name of the device used for test execution.
${suiteName}Name of the test suite executed.
${executionProfile}Execution profile used during the test run.
${startTime}Timestamp indicating when the test execution started.
${duration}Total duration of the test execution.
${totalPassed}Number of test cases that passed.
${totalFailed}Number of test cases that failed.
${totalError}Number of test cases that encountered errors.
${totalIncomplete}Number of test cases that did not complete.
${totalSkipped}Number of test cases that were skipped.
${executedBy}Username or identity that initiated the test execution.
${projectName}Name of the Katalon Studio project.
${failedReason}Describes the failure reason if the test suite did not pass.
${status}Overall status of the test suite (e.g., Passed, Failed).
${test_suite_result_table}A detailed HTML-formatted table of test case results.

For projects created in Katalon Studio version 10.1.0 or later, you can include a test case result table in the email body.

To display a test case result table in your email report, manually insert one of the following variables into your Test Suite email template where you want the table to appear:

Add a test case result table

Refer to the table below to choose the appropriate variable for your reporting needs:

VariableDescriptionWhen to Use
${test_case_result_table}Displays a detailed test case result table, including test case name, status, duration, and error messages (if any).Use for comprehensive reports intended for debugging, QA reviews, or audit documentation.
${test_case_result_table_minimal}Introduced in Katalon Studio 10.3.0, displays a simplified result table with only the test case name and execution status.Use for lightweight reports such as CI/CD notifications, stakeholder summaries, or quick overviews.
note

The ${test_case_result_table} variable is only supported in the Test Suite email template. If used in a Test Suite Collection template, the email will fail to send.

Before saving your changes, click Preview to see how the Test Suite Execution report will appear in the email.

View a preview of the Test Suite Execution email report

Below is a sample report of a successful test suite execution as received via email:

Sample Passed Test Suite Execution email report

Below is a sample report of a failed test suite execution as received via email:

Sample Failed Test Suite Execution email report

Click Apply or Apply and Close when you have finished your customization.

Customize email template for test suite collection

To customize the email body template used for a Test Suite Collection, do one of the following:

  • Go to Project > Settings > Email > Template, then select Test Suite Collection from the dropdown.

    Customize Test Suite Collection email report from Test Suite settings
  • Or click Edit Template for Test Suite Collection Execution from the Email Settings screen.

    Customize Test Suite Collection email report from Email settings

Use the following variables to customize the content of the Test Suite Collection email template:

VariableDescription
hostNameHost's name
osOperating system
suiteCollectionNameName of the Test Suite Collection
startTimeWhen the Test Suite Collection started running
durationDuration of the test execution
totalPassedTotal passed test cases
totalFailedTotal failed test cases
totalErrorTotal error test cases
totalIncompleteTotal incomplete test cases
totalSkippedTotal skipped test cases

Before saving your changes, click Preview to see how the Test Suite Collection Execution report will appear in the email.

View a preview of the Test Suite Collection Execution email report

Below is a sample Test Suite Execution report as received via email:

Sample Test Suite Collection Execution email report

Click Apply or Apply and Close when you have finished your customization.

Use global variables for emails

You can customize email settings with global variables and override their default values via the command-line.
Note:

Scope of application:

  • When sending email reports on a Test Suite, the global variables in the selected execution profile are applied.
  • When sending email reports on a Test Suite Collection:
    • For a Test Suite Collection: only the global variables in the default profile are applied.
    • For Test Suites contained in a Test Suite Collection: the global variables in the selected execution profile of each Test Suite are applied.

The below section guides you on how to do that with a usage example.

  1. Define a global variable in your execution profile. See Create a profile.
  2. Use the syntax ${GlobalVariable.name} to call the global variable in supported fields including Sender, Recipients, Cc, Bcc, Subject and Body Template.

    Note that global variables in emails only work when they are defined in the project profile. If a global variable is updated at runtime (for example, in a Listener class), the updated value will not be applied to the email body.

  3. Send a test email so you can see the effect.

    When running your Test Suite/Test Suite Collection in console mode, you can also pass another value to override the default value of that global variable with the -g_<variableName>=<variableValue> syntax. For instance, -g_<subject>=<Release 7.7>.

Was this page helpful?