Skip to main content

Share test reports via email in Katalon Studio

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.

Important:

An active Katalon Studio Enterprise license.

Email settings

In Katalon Studio, go to Project > Settings > Email to configure email settings. You can customize the email template to match the report requirements of your stakeholders 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 decide whether to include a test execution report as an email attachment or not. Specifically, you can choose to include log files and configure which report format (HTML, CSV, and PDF) of test executions to be sent as attachments in the email report.

Body template

To customize email body template for Test Suite, click Edit Template for Test Suite Execution or go to Project Settings > Email > Template and select Test Suite.

  • hostName: Host's name
  • os: Operating system
  • browser: Browser's name and version
  • deviceId: Id of the executed device
  • deviceName: Name of the executed device
  • suiteName: Name of the test suite
  • totalPassed: Total passed test cases
  • totalFailed: Total failed test cases
  • totalError: Total error test cases

For Test Suite Collection, click Edit Template for Test Suite Collection Execution or go to Project Settings > Email > Template and select Test Suite Collection.

test suite collection

  • hostName: Host's name
  • os: Operating system
  • suiteCollectionName: Name of Test Suite Collection
  • startTime: When the Test Suite Collection started running
  • duration: The duration of test execution
  • totalPassed: Total passed test cases
  • totalFailed: Total failed test cases
  • totalError: Total error test cases

All fields in the templates are editable. Click Apply when finished.

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.
  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>.