Skip to content

This tutorial guides you through the process of integrating Katalon WebUI tests with Vansah Test Management for Jira to automatically send test case results.

Notifications You must be signed in to change notification settings

testpointcorp/katalon-vansah

Repository files navigation

Katalon Integration with Vansah Test Management for Jira

This tutorial guides you through the process of integrating Katalon WebUI tests with Vansah Test Management for Jira. Integrating Katalon with Vansah will allow you to send Test Case results from Katalon to your Jira workspace.

By following this setup, you can streamline your testing workflow, ensuring that test outcomes are recorded directly in your Jira workspace.

Prerequisites

  • Katalon WebUI test project is already setup.
  • Make sure that Vansah is installed in your Jira workspace
  • You need to Generate Vansah connect token to authenticate with Vansah APIs.

Configuration

Setting Environment Variables - Store your Vansah API token as an environment variable for security.

For Windows (use cmd)

setx VANSAH_TOKEN "your_vansah_api_token_here"

For macOS

echo export VANSAH_TOKEN="your_vansah_api_token_here" >> ~/.bash_profile

source ~/.bash_profile

For Linux (Ubuntu, Debian, etc.)

echo export VANSAH_TOKEN="your_vansah_api_token_here" >> ~/.bashrc

source ~/.bashrc

Implementation

To enable Vansah integration in any WebUI Katalon project, follow these steps:

  1. Place the VansahBinding.java File: Ensure that VansahBinding.java is located in the Include/scripts/groovy directory of your project.

  2. Add the Vansah Test Listener: Add or Create @AfterTestCase listener so that after running each Test Case we can send the test results of the same test Case to Vansah.

    Ex: VansahListeners.groovy

       import com.kms.katalon.core.annotation.AfterTestCase
       import com.kms.katalon.core.context.TestCaseContext
    
       import VansahBinding;
    
       class VansahListeners {
         /**
          * Executes after every test case ends to send results to Vansah.
          * @param testCaseContext Context of the executed test case.
          */
         @AfterTestCase
         def AfterTestCase(TestCaseContext testCaseContext) {
         
             // Retrieve Test Case and Asset details
             def vansahData = testCaseContext.getTestCaseVariables()
             def testCaseKey = vansahData.get("TestCaseKey")
             def assetKey = vansahData.get("Asset")
         
             VansahBinding vb = new VansahBinding();
             vb.sendResultstoVansah(testCaseKey, assetKey, testCaseContext.getTestCaseStatus());
         }
       }
    
     	
     	}
       }
  3. Configure Test Run Properties: Modify Profiles/default.glbl with your specific Vansah URL and test run properties to ensure proper configuration and communication with Vansah. VansahVariablesinDefaultProfile

    OR

    Copy and Paste below script to your default profile, include inside <GlobalVariableEntities>

    <GlobalVariableEntity>
      <description>Required : Obtain your Vansah Connect URL from Vansah Settings > Vansah API Tokens </description>
      <initValue>'https://prod.vansahnode.app'</initValue>
      <name>Vansah_URL</name>
    </GlobalVariableEntity>
    <GlobalVariableEntity>
      <description>Optional : Provide your Sprint Name</description>
      <initValue>'SM Sprint 1'</initValue>
      <name>SprintName</name>
    </GlobalVariableEntity>
    <GlobalVariableEntity>
      <description>Optional : Provide your Release Name</description>
      <initValue>'Release 24'</initValue>
      <name>ReleaseName</name>
    </GlobalVariableEntity>
    <GlobalVariableEntity>
      <description>Optional : Provide your Environment Name</description>
      <initValue>'UAT'</initValue>
      <name>EnvironmentName</name>
    </GlobalVariableEntity>
  4. Prepare Test Cases: Incorporate test case and asset details directly within your Katalon test case files. This step ensures that all necessary information for Vansah reporting is readily available.

    VansahTestCaseandAssetDetails

Conclusion

By following the above steps, your Katalon project will be equipped to send test run results directly to Vansah, streamlining your testing and reporting process.

Ensure that all files are placed and configured as described to facilitate successful integration.

For more details on Katalon, visit the Test Fixtures and Test Listeners in Katalon Studio.

For Vansah specific configurations and API details, please refer to the Vansah API documentation.

About

This tutorial guides you through the process of integrating Katalon WebUI tests with Vansah Test Management for Jira to automatically send test case results.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published