|
| 1 | +--- |
| 2 | +id: smartui-cli-env-variables |
| 3 | +title: SmartUI SDK Environment Variables |
| 4 | +sidebar_label: Set Environment Variables |
| 5 | +description: In this documentation, learn about the various environment variables available in SmartUI |
| 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 | + |
| 18 | +url: https://www.lambdatest.com/support/docs/smartui-cli-env-variables/ |
| 19 | +slug: smartui-cli-env-variables/ |
| 20 | +--- |
| 21 | + |
| 22 | +import Tabs from '@theme/Tabs'; |
| 23 | +import TabItem from '@theme/TabItem'; |
| 24 | +import NewTag from '../src/component/newTag'; |
| 25 | + |
| 26 | +--- |
| 27 | + |
| 28 | +<script type="application/ld+json" |
| 29 | + dangerouslySetInnerHTML={{ __html: JSON.stringify({ |
| 30 | + "@context": "https://schema.org", |
| 31 | + "@type": "BreadcrumbList", |
| 32 | + "itemListElement": [{ |
| 33 | + "@type": "ListItem", |
| 34 | + "position": 1, |
| 35 | + "name": "LambdaTest", |
| 36 | + "item": "https://www.lambdatest.com" |
| 37 | + },{ |
| 38 | + "@type": "ListItem", |
| 39 | + "position": 2, |
| 40 | + "name": "Support", |
| 41 | + "item": "https://www.lambdatest.com/support/docs/" |
| 42 | + },{ |
| 43 | + "@type": "ListItem", |
| 44 | + "position": 3, |
| 45 | + "name": "Smart Visual Testing", |
| 46 | + "item": "https://www.lambdatest.com/support/docs/smart-ui-cypress/" |
| 47 | + }] |
| 48 | + }) |
| 49 | + }} |
| 50 | +></script> |
| 51 | + |
| 52 | +Welcome to the world of simplified visual testing with the SmartUI SDK. |
| 53 | + |
| 54 | +This guide is designed to provide you with comprehensive information about the various environment variables options available within the SmartUI SDK. SmartUI retrieves additional details from the environment it is running in, like the branch name, baseline branch,proxies etc. You can modify certain aspects of SmartUI behavior by configuring these environment variables within your CI environment: |
| 55 | + |
| 56 | + |
| 57 | + |
| 58 | +## 1. Setting the Baseline Branch |
| 59 | + |
| 60 | +Set the baseline branch for `CLI` projects: |
| 61 | + |
| 62 | +<Tabs className="docs__val" groupId="language"> |
| 63 | +<TabItem value="MacOS/Linux" label="MacOS/Linux" default> |
| 64 | + |
| 65 | +```bash |
| 66 | +export BASELINE_BRANCH="Required branch" |
| 67 | +``` |
| 68 | +</TabItem> |
| 69 | +<TabItem value="Windows" label="Windows" default> |
| 70 | + |
| 71 | +```bash |
| 72 | +set BASELINE_BRANCH="Required branch" |
| 73 | +``` |
| 74 | +</TabItem> |
| 75 | +</Tabs> |
| 76 | + |
| 77 | +## 2. Setting the current branch |
| 78 | + |
| 79 | +Set the current branch for `CLI` projects: |
| 80 | + |
| 81 | +<Tabs className="docs__val" groupId="language"> |
| 82 | +<TabItem value="MacOS/Linux" label="MacOS/Linux" default> |
| 83 | + |
| 84 | +```bash |
| 85 | +export CURRENT_BRANCH="Required branch" |
| 86 | +``` |
| 87 | +</TabItem> |
| 88 | +<TabItem value="Windows" label="Windows" default> |
| 89 | + |
| 90 | +```bash |
| 91 | +set CURRENT_BRANCH="Required branch" |
| 92 | +``` |
| 93 | +</TabItem> |
| 94 | +</Tabs> |
| 95 | + |
| 96 | +## 3. Setting proxies |
| 97 | + |
| 98 | +In case you are accessing your network using corporate proxies, set the proxies in the environment variables as follows |
| 99 | + |
| 100 | +#### HTTP_PROXY: |
| 101 | + |
| 102 | +<Tabs className="docs__val" groupId="language"> |
| 103 | +<TabItem value="MacOS/Linux" label="MacOS/Linux" default> |
| 104 | + |
| 105 | +```bash |
| 106 | +export HTTP_PROXY="Required branch" |
| 107 | +``` |
| 108 | +</TabItem> |
| 109 | +<TabItem value="Windows" label="Windows" default> |
| 110 | + |
| 111 | +```bash |
| 112 | +set HTTP_PROXY="Required branch" |
| 113 | +``` |
| 114 | +</TabItem> |
| 115 | + |
| 116 | +</Tabs> |
| 117 | + |
| 118 | + |
| 119 | +#### HTTPS_PROXY: |
| 120 | + |
| 121 | +<Tabs className="docs__val" groupId="language"> |
| 122 | +<TabItem value="MacOS/Linux" label="MacOS/Linux" default> |
| 123 | + |
| 124 | +```bash |
| 125 | +export HTTPS_PROXY="Required branch" |
| 126 | +``` |
| 127 | +</TabItem> |
| 128 | +<TabItem value="Windows" label="Windows" default> |
| 129 | + |
| 130 | +```bash |
| 131 | +set HTTPS_PROXY="Required branch" |
| 132 | +``` |
| 133 | +</TabItem> |
| 134 | +</Tabs> |
| 135 | + |
| 136 | +> **NOTE :** In most cases setting only HTTP_PROXY should be enough, but if you have different proxies for HTTP and HTTPS, you can set both.The format for proxy’s is `http[s]://<username>:<password>@<domain.com>:<port>/` [username and password is optional]. |
| 137 | +
|
| 138 | +## 4. Enabling Debug mode |
| 139 | + |
| 140 | +To enable SmartUI CLI Debug mode, use the following environment variable. |
| 141 | + |
| 142 | +<Tabs className="docs__val" groupId="language"> |
| 143 | +<TabItem value="MacOS/Linux" label="MacOS/Linux" default> |
| 144 | + |
| 145 | +```bash |
| 146 | +export LT_SDK_DEBUG=true |
| 147 | +``` |
| 148 | +</TabItem> |
| 149 | +<TabItem value="Windows" label="Windows" default> |
| 150 | + |
| 151 | +```bash |
| 152 | +set LT_SDK_DEBUG=true |
| 153 | +``` |
| 154 | +</TabItem> |
| 155 | +</Tabs> |
| 156 | + |
| 157 | +## 5. Ignoring captured cookies |
| 158 | + |
| 159 | +Set the following variable to true, to stop the use of cookies captured automatically. The default is set to `false`. |
| 160 | + |
| 161 | +<Tabs className="docs__val" groupId="language"> |
| 162 | +<TabItem value="MacOS/Linux" label="MacOS/Linux" default> |
| 163 | + |
| 164 | +```bash |
| 165 | +export SMARTUI_DO_NOT_USE_CAPTURED_COOKIES=true |
| 166 | +``` |
| 167 | +</TabItem> |
| 168 | +<TabItem value="Windows" label="Windows" default> |
| 169 | + |
| 170 | +```bash |
| 171 | +set SMARTUI_DO_NOT_USE_CAPTURED_COOKIES=true |
| 172 | +``` |
| 173 | +</TabItem> |
| 174 | +</Tabs> |
| 175 | + |
| 176 | +<nav aria-label="breadcrumbs"> |
| 177 | + <ul className="breadcrumbs"> |
| 178 | + <li className="breadcrumbs__item"> |
| 179 | + <a className="breadcrumbs__link" target="_self" href="https://www.lambdatest.com"> |
| 180 | + Home |
| 181 | + </a> |
| 182 | + </li> |
| 183 | + <li className="breadcrumbs__item"> |
| 184 | + <a className="breadcrumbs__link" target="_self" href="https://www.lambdatest.com/support/docs/"> |
| 185 | + Support |
| 186 | + </a> |
| 187 | + </li> |
| 188 | + <li className="breadcrumbs__item breadcrumbs__item--active"> |
| 189 | + <span className="breadcrumbs__link"> Smart UI with Cypress </span> |
| 190 | + </li> |
| 191 | + </ul> |
| 192 | +</nav> |
0 commit comments