|
| 1 | +--- |
| 2 | +id: smartui-katalon-plugin |
| 3 | +title: SmartUI Plugin for Katalon Studio |
| 4 | +sidebar_label: Katalon Plugin |
| 5 | +description: Integrate LambdaTest SmartUI with Katalon Studio to perform visual regression testing directly in your test automation workflows. |
| 6 | +keywords: |
| 7 | + - Visual Regression |
| 8 | + - Visual Regression Testing Guide |
| 9 | + - Visual Regression Test Automation |
| 10 | + - Visual Regression Automation Testing |
| 11 | + - Running Visual Regression Tests |
| 12 | + - Visual Regression Testing Online |
| 13 | + - Run Visual Regression |
| 14 | + - Visual Regression Run Specific Test |
| 15 | + - Visual Regression Testing Environment |
| 16 | + - How to Run Visual Regression Tests |
| 17 | + - Katalon Studio |
| 18 | + - Katalon SmartUI Integration |
| 19 | + |
| 20 | +url: https://www.lambdatest.com/support/docs/smartui-katalon-plugin/ |
| 21 | +site_name: LambdaTest |
| 22 | +slug: smartui-katalon-plugin |
| 23 | +--- |
| 24 | + |
| 25 | +import Tabs from '@theme/Tabs'; |
| 26 | +import TabItem from '@theme/TabItem'; |
| 27 | +import {YOUR_LAMBDATEST_USERNAME, YOUR_LAMBDATEST_ACCESS_KEY} from "@site/src/component/keys"; |
| 28 | +import CodeBlock from '@theme/CodeBlock'; |
| 29 | + |
| 30 | +<script type="application/ld+json" |
| 31 | + dangerouslySetInnerHTML={{ __html: JSON.stringify({ |
| 32 | + "@context": "https://schema.org", |
| 33 | + "@type": "BreadcrumbList", |
| 34 | + "itemListElement": [{ |
| 35 | + "@type": "ListItem", |
| 36 | + "position": 1, |
| 37 | + "name": "Home", |
| 38 | + "item": "https://www.lambdatest.com" |
| 39 | + },{ |
| 40 | + "@type": "ListItem", |
| 41 | + "position": 2, |
| 42 | + "name": "Support", |
| 43 | + "item": "https://www.lambdatest.com/support/docs/" |
| 44 | + },{ |
| 45 | + "@type": "ListItem", |
| 46 | + "position": 3, |
| 47 | + "name": "SmartUI Katalon Plugin", |
| 48 | + "item": "https://www.lambdatest.com/support/docs/smartui-katalon-plugin/" |
| 49 | + }] |
| 50 | + }) |
| 51 | + }} |
| 52 | +></script> |
| 53 | + |
| 54 | +The **Katalon Studio SmartUI Plugin** integrates [Katalon Studio](https://www.katalon.com/) with [LambdaTest SmartUI](https://www.lambdatest.com/support/docs/smart-visual-regression-testing/), enabling **visual regression testing** directly inside your test automation workflows. |
| 55 | + |
| 56 | +With this plugin, you can: |
| 57 | +- Capture screenshots at any point in your test flow |
| 58 | +- Compare them with visual baselines |
| 59 | +- Detect UI changes early in your CI/CD pipeline |
| 60 | + |
| 61 | +--- |
| 62 | + |
| 63 | + |
| 64 | +## Installation |
| 65 | + |
| 66 | +### Option 1: Install via Katalon Store (Recommended) |
| 67 | + |
| 68 | +1. Open [Katalon Store](https://store.katalon.com/). |
| 69 | +2. Search for **“SmartUI”** or browse under *Plugins > Integrations*. |
| 70 | +3. Click **Install** to add the plugin to your Katalon Studio instance. |
| 71 | + |
| 72 | +### Option 2: Manual Installation via JAR |
| 73 | + |
| 74 | +1. Download the latest `katalon-studio-smartui-plugin.jar` from the [official release page](https://github.com/LambdaTest/katalon-studio-smartui-plugin/releases). |
| 75 | +2. In Katalon Studio, go to **Project > Settings > Plugins > Import Plugin**. |
| 76 | +3. Select the downloaded `.jar` file and click **Import**. |
| 77 | + |
| 78 | +--- |
| 79 | + |
| 80 | +## Configuration & Usage |
| 81 | + |
| 82 | +### Step 1: Create a SmartUI Project |
| 83 | + |
| 84 | +1. Go to [SmartUI Projects Page](https://smartui.lambdatest.com/). |
| 85 | +2. Click **New Project**. |
| 86 | +3. Select platform as **CLI** (for Katalon integration). |
| 87 | +4. Enter project name, approvers, and tags (optional). |
| 88 | +5. Click **Submit** and copy your **Project Token** from the dashboard. |
| 89 | + |
| 90 | +> Your Project Token will be used to authenticate screenshot uploads to SmartUI. |
| 91 | + |
| 92 | +--- |
| 93 | + |
| 94 | +### Step 2: Start your Katalon Instance from terminal |
| 95 | + |
| 96 | +Run the following command in the terminal to start the Katalon instance. |
| 97 | + |
| 98 | + |
| 99 | +```bash |
| 100 | +/Applications/Katalon\ Studio\ Enterprise.app/Contents/MacOS/katalon |
| 101 | +``` |
| 102 | +--- |
| 103 | + |
| 104 | +### Step 3: Set Environment Variable |
| 105 | + |
| 106 | +In your Katalon project, set the `PROJECT_TOKEN` environment variable: |
| 107 | + |
| 108 | +#### Via Project Settings: |
| 109 | +1. Go to **Project > Settings > Plugins > SmartUI Integration**. |
| 110 | +2. Here you may set your project token |
| 111 | + |
| 112 | + |
| 113 | +```bash |
| 114 | +PROJECT_TOKEN = "project_token..." |
| 115 | +``` |
| 116 | + |
| 117 | +--- |
| 118 | + |
| 119 | +### Step 4: Configure SmartUI in Your Test Case |
| 120 | + |
| 121 | +Use the provided custom keywords to start, capture, and stop SmartUI sessions. |
| 122 | + |
| 123 | +#### Minimal Example: |
| 124 | + |
| 125 | +```groovy |
| 126 | +// Start SmartUI Server |
| 127 | +// Replace 'buildName' with your desired build name (optional) |
| 128 | +CustomKeywords.'com.katalon.plugin.keyword.smartui.SmartKeywords.startServer'('My Katalon Build', '', '') |
| 129 | + |
| 130 | +// Open Browser |
| 131 | +WebUI.openBrowser('') |
| 132 | +WebUI.navigateToUrl('https://lambdatest.com') |
| 133 | + |
| 134 | +// Capture Snapshot with SmartUI |
| 135 | +// The string parameter is the snapshot name (will appear in SmartUI Dashboard) |
| 136 | +CustomKeywords.'com.katalon.plugin.keyword.smartui.SmartKeywords.takeSnapshot'('Homepage Snapshot') |
| 137 | + |
| 138 | +// Stop SmartUI Server |
| 139 | +CustomKeywords.'com.katalon.plugin.keyword.smartui.SmartKeywords.stopServer'() |
| 140 | + |
| 141 | +// Close Browser |
| 142 | +WebUI.closeBrowser() |
| 143 | +``` |
| 144 | + |
| 145 | +--- |
| 146 | + |
| 147 | +### Step 5: Advanced Configuration (Optional) |
| 148 | + |
| 149 | +You can pass additional configuration via a JSON file or inline parameters. |
| 150 | + |
| 151 | +#### Using a Config File (`config.json`): |
| 152 | + |
| 153 | +```json |
| 154 | +{ |
| 155 | + "deviceName": "Chrome Desktop", |
| 156 | + "platform": "Windows", |
| 157 | + "fullPage": true, |
| 158 | + "ignoreBoxes": { |
| 159 | + "xpath": [ |
| 160 | + "//*[@class='dynamic-ad']", |
| 161 | + "//*[@id='timestamp']" |
| 162 | + ] |
| 163 | + } |
| 164 | +} |
| 165 | +``` |
| 166 | + |
| 167 | +Then use it in your test: |
| 168 | + |
| 169 | +```groovy |
| 170 | +CustomKeywords.'com.katalon.plugin.keyword.smartui.SmartKeywords.startServer'('Build v1.0', 'config.json', '') |
| 171 | +``` |
| 172 | + |
| 173 | +> Use `ignoreBoxes` to exclude dynamic elements (ads, timestamps) from comparison. |
| 174 | +> Use `selectBoxes` to compare only specific regions (e.g., main content area). |
| 175 | + |
| 176 | +--- |
| 177 | + |
| 178 | +## Running Tests |
| 179 | + |
| 180 | +1. Execute your test case as usual in Katalon Studio. |
| 181 | +2. After test completion, visit your [SmartUI Dashboard](https://smartui.lambdatest.com/) to: |
| 182 | + - View captured screenshots |
| 183 | + - Compare against baseline images |
| 184 | + - Approve or reject visual changes |
| 185 | + - Manage builds and baselines |
| 186 | + |
| 187 | +--- |
| 188 | + |
| 189 | +## Best Practices |
| 190 | + |
| 191 | +- Always include `startServer()` before taking screenshots and `stopServer()` after. |
| 192 | +- Use descriptive snapshot names for easy identification in SmartUI. |
| 193 | +- For CI/CD pipelines, set `PROJECT_TOKEN` as an environment variable in your CI tool (Jenkins, GitHub Actions, etc.). |
| 194 | +- Combine with Katalon’s built-in reporting for comprehensive test insights. |
| 195 | + |
| 196 | +--- |
| 197 | + |
| 198 | +## Troubleshooting |
| 199 | + |
| 200 | +- **“Project Token not found”**: Ensure `PROJECT_TOKEN` is set in environment variables or passed explicitly. |
| 201 | +- **No screenshots uploaded**: Verify network connectivity and that SmartUI server started successfully. |
| 202 | +- **Dynamic content causing false positives**: Use `ignoreBoxes` or `selectBoxes` in config to stabilize comparisons. |
| 203 | + |
| 204 | +--- |
| 205 | + |
| 206 | +<nav aria-label="breadcrumbs"> |
| 207 | + <ul className="breadcrumbs"> |
| 208 | + <li className="breadcrumbs__item"> |
| 209 | + <a className="breadcrumbs__link" target="_self" href="https://www.lambdatest.com"> |
| 210 | + Home |
| 211 | + </a> |
| 212 | + </li> |
| 213 | + <li className="breadcrumbs__item"> |
| 214 | + <a className="breadcrumbs__link" target="_self" href="https://www.lambdatest.com/support/docs/"> |
| 215 | + Support |
| 216 | + </a> |
| 217 | + </li> |
| 218 | + <li className="breadcrumbs__item breadcrumbs__item--active"> |
| 219 | + <span className="breadcrumbs__link">SmartUI Katalon Plugin</span> |
| 220 | + </li> |
| 221 | + </ul> |
| 222 | +</nav> |
0 commit comments