Introduction
Hello, Readers!!
Have you guys heard about Katalon Studio?
No? Don’t worry, we got you covered. Katalon Studio is a robust automation tool with a Selenium-based engine. It is designed in order to create and reuse automated test scripts for UI without needing to code.
In this blog, we will discuss the email and network settings in Katalon Studio. So let us begin!
Email Settings
Once the test suite or test suite collection has been executed, the user might want to automatically send summary reports to either their email account or to any other stakeholders to notify them about the test results. The below section will help a user to set up their mail server and customize email reports in order to automatically send summary report emails whenever a test execution finishes.
What can be done in the email settings
A user in Katalon Studio can configure a global email setting in Project > Settings > Email for the mail server, email template, and report format. Users can customize the email template in order to match their stakeholders' report requirements. They can also choose the type of report files that are to be sent as an attachment.
Source: Katalon Docs
After the user has successfully set up the mail server, sender, and recipients, the Katalon Studio, by default, sends all of the email reports for the test suite executions, including the test suites, inside a test suite collection. Katalon Studio Enterprise also offers an exclusive feature that has an option that helps the user keep their mailbox tidy by only sending them email reports for the test suite collection executions. This option comes in handy when executing test suite collections that contain many test suites.
Setting up the mail server
The mail server which Katalon Studio uses for sending emails is defined in the Mail Server Settings. In order to set up a mail server, the user needs to fill in their mail server host, port credentials, as well as choose a protocol option.
Host and Port
The host is the domain name of the mail server. The port is the port that is to be used for the server. Some of the common outgoing mail server configurations are mentioned below:
Username and Password
The username is the user's full email account that is used to authenticate with the server. The password is the user's email password to authenticate with the server.
For Gmail users:
If the user's email account uses a two-step authentication, then the user can use their Google App Passwords in order to set up a Gmail account in Katalon Studio. But if in case the user's email account does not use two-step authentication, then the user can permit less secure apps to access their account.
Protocol
It is the protocol that is selected in order to communicate with the mail server. The user has the below-mentioned options to choose from:
- None
- SSL
- TLS
After the mail server information is filled in, the user can send a test email in order to check if the mail server is set up correctly. In order to send a test email, the user needs to input an email in the Recipients field and then click on the Send Test Email option. The Send Test Email button is only enabled once the Mail Server Settings, as well as Recipients, are filled in correctly.
Email Template
Users can define the sender, recipients, email subject, and body template in the section shown below.
Source: Katalon Docs
It also supports adding Test Suite and Test Suite Collection names in the email subject along with the placeholders ${suiteName} and ${suiteCollectionName} from Katalon Studio version 8.3.0 onwards.
Report Format
Users can decide whether or not to include the test execution report as an email attachment. Users are specifically given the option to include log files. They can also configure the report format of the test executions that are to be sent as attachments in the email report.
Body Template
In order to customize the email's body template for the test suite's email, the user needs to click on Edit Template for Test Suite Execution.
- hostName: it is the name of the host.
- os: it is the operating system.
- browser: it is the browser's name as well as the version.
- deviceId: it is the name of the executed device
- suiteId: it is the Id of the test suite.
- suiteName: it is the name of the test suite.
- totalPassed: it is the total passed test cases.
- totalFailed: it is the total failed test cases.
-
totalError: it is the total error test cases.
In order to customize the email's body template for the test suite collections' email, the user needs to click on Edit Template for Test Suite Collection Execution.
- hostName: it is the name of the host.
- os: it is the operating system.
- suiteCollectionName: it is the name of the test suite collection.
- startTime: it is the time when the test suite collection started running.
- Duration: it is the duration of test execution.
- totalPassed: it is the total passed test cases.
- totalFailed: it is the total failed test cases.
- totalError: it is the total error test cases.
Support Global Variables in Email Settings
From version 7.7.0 onwards, users can now customize the email settings with global variables as well as override their default values via the command line.
- In the Execution Profile, define a global variable
- Using the syntax ${GlovalVariable.name} call the parameterized global variable in supported locations.
Users can also pass another value to override the Global variable's default value when running the Test Suite/Test Suite Collection in console mode using -g_<variableName>=<variableValue> syntax.