How we built Katalon Studio's TestRail integration plugin


#1

Hi everyone,

I want to share with you the way we implement Katalon Studio’s TestRail integration plugin. I will not go into details since the implementation is easy to understand. All functions are implemented using extension point, which are declared in plugin.xml. You can see plugin’s activities by selecting the tab Event Log (next to Console).

https://store.katalon.com/product/13/TestRail-Integration

The source code is made available here for reference.

This post is not about how to use the plugin. Please visit our docs site if you need help.

Setting page

Add an 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>

For implementation, see class com.katalon.plugin.testrail.TestRailToolItemDescription.

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>

For implementation, see classes com.katalon.plugin.testrail.TestRailPluginPreferencePage and com.katalon.plugin.testrail.TestRailPreferencePage. Settings are saved per project.

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

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

For implementation, see classes com.katalon.plugin.testrail.TestRailTestCaseIntegrationViewDescription and com.katalon.plugin.testrail.TestRailTestCaseIntegrationView.

Execute Test Cases selectively based on TestRail’s settings

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

For implementation, see class com.katalon.plugin.testrail.TestRailQueryingTestSuite.

Sending result to TestRail

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

For implementation, see class com.katalon.plugin.testrail.TestRailEventListenerInitializer.

TestRail SDK

http://docs.gurock.com/testrail-api2/bindings-java

If you have any question or feedback, feel free to let us know.


How to integrate Katalon Studio to TestRail to report test case results
#4

Hello, could you please explain how to post the Katalon execution result such as HTML report into TestRail after execution.