Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding Ninjas X Naukri.com
Table of contents
1.
Introduction
2.
Email Settings
2.1.
What can be done in the email settings
2.2.
Setting up the mail server
2.2.1.
Host and Port
2.2.2.
Username and Password
2.2.3.
Protocol
2.3.
Email Template
2.4.
Report Format
2.5.
Body Template
2.6.
Support Global Variables in Email Settings
3.
Network Settings
3.1.
Bypass certificate validation in Katalon Studio
3.2.
Use client certificates for requests in API projects
3.2.1.
Requirements
4.
Frequently Asked Questions
4.1.
What is the port number for the Outlook server?
4.2.
What is the recommended key store format?
4.3.
Is it possible for users with protected network policies to work with Katalon Studio?
5.
Conclusion
Last Updated: Mar 27, 2024
Easy

Email and Network Settings in Katalon Studio

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 and Network Settings in Katalon Studio

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.

Project settings window

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:

Host and Port numbers of different email servers

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.

Email template window

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.

Network Settings

Users can configure the certificate settings as well as the client certificate settings through the network settings.

Bypass certificate validation in Katalon Studio

Users with protected network policies can also work with the Katalon Studio since it supports the capability to bypass the certificate validation. The configuration affects the WebUI as well as the Web Service tests. In order to configure the certificate settings, follow the below-mentioned steps:

  • Navigate to Project > Settings > Network.
  • In the Certificate Settings Section, select the Bypass certificate validation option.
  • Click on Apply

Use client certificates for requests in API projects

Requirements

The following requirements are necessary in order to use a client certificate for requests in API projects:

  • An active Katalon Studio Enterprise license.
  • The setting is only applied for requests in API/Web Services projects.


The Katalon Studio can be configured to use the client certificate for all of the requests. Users can configure the client certificate by navigating to Project > Settings > Network > Client Certificate Settings. In order to sign all of the requests from the Katalon Studio, the user needs to specify the full path to their KeyStore file as well as the KeyStore password. 

If the user wants to generate public and private key pairs for the configuration, then the user can use the keytool utility, which is included in the JDK installation. To do so, follow the below steps:

  • Open the command prompt and go to the bin folder in the JDK folder.
  • Use the following mentioned command to create a KeyStore:
keytool -genkey -alias katalon -keyalg RSA -keystore katalon.keystore
  • For the new KeyStore, enter a password and provide the utility with the required information, such as the user's name, the name of the organization, etc.
  • In order to export the certificate with a public key, the user needs to run the below-mentioned command:
keytool -export -alias katalon -file katalon.cer -keystore katalon.keystore

Frequently Asked Questions

What is the port number for the Outlook server?

The port number for the Outlook server is 587 or 25.

What is the recommended key store format?

The recommended key store format is PKCS #12.

Is it possible for users with protected network policies to work with Katalon Studio?

Yes, users with protected network policies can work with Katalon Studio since katalon studio has the capability of bypassing the certificate validation.

Conclusion

In this article, we have extensively discussed the Email and Network Settings in Katalon Studio.

After reading about the Email and Network Settings in Katalon Studio, are you not feeling excited to read/explore more articles on APIs? Don't worry; Coding Ninjas has you covered. 

If you wish to enhance your skills in Data Structures and AlgorithmsCompetitive ProgrammingJavaScript, etc., you should check out our Guided path column at Coding Ninjas Studio. We at Coding Ninjas Studio organize many contests in which you can participate. You can also prepare for the contests and test your coding skills by giving the mock test series available. In case you have just started the learning process, and your dream is to crack major tech giants like Amazon, Microsoft, etc., then you should check out the most frequently asked problems and the interview experiences of your seniors that will help you in landing a job in your dream company. 

Do upvote if you find the blogs helpful.

Happy Learning!

Thank you

Live masterclass