Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding Ninjas X Naukri.com
Table of contents
1.
Introduction
2.
TestRail Plugin
3.
Setting page
3.1.
Add an icon to the toolbar
3.2.
Add a setting page
4.
Link Katalon Studio’s Test Cases with TestRail’s Test Cases
5.
Execute Test Cases selectively based on TestRail’s settings
6.
Sending result to TestRail
7.
Frequently Asked Questions
7.1.
How do I get the integration key in TestRail?
7.2.
Can TestRail run automated tests?
7.3.
Is TestRail a test management tool?
8.
Conclusion
Last Updated: Mar 27, 2024
Easy

Example plugin: Build Katalon Studio's TestRail Integration plugin

Author Sanjana Yadav
0 upvote

Introduction

Hello Reader!! 

Previously we learned to create a customized report and also to generate a groovy doc in Katalon studio. Now, we already know how important plugins are in Katalon studio. They are a very effective tool for Dynamic execution in Katalon studio. So, today we will be learning to implement another plugin, called the TesRail Integration plugin, in Katalon Studio.

Example plugin: Build Katalon Studio's TestRail Integration plugin

So, without any further ado, let’s get started!!

TestRail Plugin

The TestRail plugin connects your Katalon Studio project to TestRail. This plugin includes the following features:

  • Connects test cases in Katalon Studio and TestRail.
  • Creates a new TestRail Test Run using the test execution results from Katalon Studio.
  • Updates an existing TestRail Test Run with the results of the most recent Katalon Studio test run.
  • Gives Katalon Studio's Dynamic Execution functionality TestRail-based search syntax.

Setting page

The below image shows the setting page to set up the TestRail configuration plugin. Fill in the details and click on Apply and Close button.

Setting page

Add an icon to the toolbar

Use the following code to add the icon to the toolbar.

<extension
        point="com.katalon.platform.extensions">
    <point
            id="com.katalon.plugin.testrail.TestRailToolItemDescription"
            extensionPointId="com.katalon.platform.api.extension.newToolItem"
            implementationClass="com.katalon.plugin.testrail.TestRailToolItemDescription">
    </point>
</extension>

Add a setting page

Use the following code to Add a setting page.

<extension
      point="com.katalon.platform.extensions">
  <point
        id="com.katalon.plugin.testrail.TestRailPluginPreferencePage"
        extensionPointId="com.katalon.platform.api.extension.pluginPreferencePage"
        implementationClass="com.katalon.plugin.testrail.TestRailPluginPreferencePage">
  </point>
</extension>

Link Katalon Studio’s Test Cases with TestRail’s Test Cases

To verify this, open the test case, then click on the integration section at the bottom.

Link Katalon Studio’s Test Cases with TestRail’s Test Cases

Below is the code for the same.

<extension
        point="com.katalon.platform.extensions">
    <point
            id="com.katalon.plugin.testrail.TestRailTestCaseIntegrationPage"
            extensionPointId="com.katalon.platform.api.extension.testCaseIntegrationViewDescription"
            implementationClass="com.katalon.plugin.testrail.TestRailTestCaseIntegrationViewDescription">
    </point>
</extension>

Execute Test Cases selectively based on TestRail’s settings

Use the following code to get this feature:

<extension
        point="com.katalon.platform.extensions">
    <point
            id="com.katalon.plugin.dynamic_execution.TestRailFilteringTestSuiteImpl"
            extensionPointId="com.katalon.platform.api.extension.dynamicQueryingTestSuiteDescription"
            implementationClass="com.katalon.plugin.testrail.TestRailQueryingTestSuite">
    </point>
</extension>

Sending result to TestRail

Use the code below to implement this:

<extension
        point="com.katalon.platform.extensions">
    <point
            id="com.katalon.plugin.testrail.TestRailEventListenerInitializer"
            extensionPointId="com.katalon.platform.api.extension.eventListener"
            implementationClass="com.katalon.plugin.testrail.TestRailEventListenerInitializer">
    </point>
</extension>

Frequently Asked Questions

How do I get the integration key in TestRail?

Fill in your TestRail username. Log in as an Admin account and go to "My Settings," then to the "API Keys" tab.

Can TestRail run automated tests?

You may add a new button to the TestRail UI to activate automated test runs using UI scripts. When you click it, an HTTP request is sent to the executor, which begins the automated tests.

Is TestRail a test management tool?

TestRail is a web-based solution for managing test cases. It is used to monitor, track, and organize software testing activities by testers, developers, and team leads.

Conclusion

To sum up the article, today, we learned about the TestRail plugin and its features and to build the Katalon Studio’s TestRail Integration plugin.

We hope that this blog has helped you understand the Katalon Studio and its working. To learn more about Katalon and its several features, you can refer to

You can also visit our website to read more such blogs. Make sure you enroll in the courses we provide, take mock tests, solve problems, and interview puzzles. Also, you can prepare for interviews with interview experiences and an interview bundle.

Keep learning and keep growing, Ninjas!

Thankyou
Live masterclass