|
| 1 | +--- |
| 2 | +id: kane-ai-secrets |
| 3 | +title: 'Utilizing KaneAI Secrets Feature: A Step-by-Step Guide' |
| 4 | +hide_title: false |
| 5 | +sidebar_label: Secrets |
| 6 | +description: Learn how to create, update and use custom secrets from the test manager and while executing your tests using the Kane AI |
| 7 | +keywords: |
| 8 | + - lambdatest automation |
| 9 | + - lambdatest kaneai |
| 10 | + - kaneai secrets |
| 11 | + - kaneai parameters |
| 12 | +url: https://www.lambdatest.com/support/docs/kane-ai-secrets/ |
| 13 | +site_name: LambdaTest |
| 14 | +slug: kane-ai-secrets/ |
| 15 | +--- |
| 16 | + |
| 17 | +<script type="application/ld+json" |
| 18 | + dangerouslySetInnerHTML={{ __html: JSON.stringify({ |
| 19 | + "@context": "https://schema.org", |
| 20 | + "@type": "BreadcrumbList", |
| 21 | + "itemListElement": [{ |
| 22 | + "@type": "ListItem", |
| 23 | + "position": 1, |
| 24 | + "name": "Home", |
| 25 | + "item": "https://www.lambdatest.com" |
| 26 | + },{ |
| 27 | + "@type": "ListItem", |
| 28 | + "position": 2, |
| 29 | + "name": "Support", |
| 30 | + "item": "https://www.lambdatest.com/support/docs/" |
| 31 | + },{ |
| 32 | + "@type": "ListItem", |
| 33 | + "position": 3, |
| 34 | + "name": "KaneAI Secrets", |
| 35 | + "item": "https://www.lambdatest.com/support/docs/kane-ai-secrets/" |
| 36 | + }] |
| 37 | + }) |
| 38 | + }} |
| 39 | +></script> |
| 40 | +KaneAI now supports the use of secret variables to enhance security and streamline functionality. This feature leverages HashiCorp Vault for secure management of sensitive information, ensuring robust protection for your data while maintaining ease of use. This guide outlines the process for creating, managing, and utilizing secret variables within KaneAI. |
| 41 | + |
| 42 | +:::note |
| 43 | +- In Web/App Agent, users will see list of all secrets created at user or org level for that user. |
| 44 | +- A user role can create only user level secrets, while an admin can create either user-level or org-level secrets. |
| 45 | +- A user can delete their own secrets, but only an admin can delete org-level secrets. |
| 46 | +- Secret variables will be accessible in test steps, modules, and test cases. |
| 47 | +::: |
| 48 | + |
| 49 | +## How to Create Secrets and use them in your tests? |
| 50 | +You can create Secrets variables via: |
| 51 | +- Test Manager |
| 52 | +- Web/App Agent |
| 53 | + |
| 54 | +### Create Secrets via Test Manager |
| 55 | +**Step 1:** Navigate to the Test Manager. <br /> |
| 56 | +**Step 2:** Click on the settings icon > Secrets.<br /> |
| 57 | +**Step 3:** Click on the **Create new secret** button.<br /> |
| 58 | +**Step 4:** Provide the secret key and value and click on the **Create Secret** button. |
| 59 | + |
| 60 | +<img loading="lazy" src={require('../assets/images/kane-ai/features/secrets/test-manager-secret.gif').default} className="doc_img"/> |
| 61 | + |
| 62 | +### Create Secrets via Web/App Agent |
| 63 | +**Step 1:** Navigate to the **"Write a Step"** field where you typically write your test scenarios in plain English. <br /> |
| 64 | +**Step 2:** To switch to Secrets mode, type the forward slash / or click on the + icon. You will see a Secret pop-up option appear. <br /> |
| 65 | +**Step 3:** Provide the secret key and value and click on the **Create Secret** button. |
| 66 | + |
| 67 | +<video class="right-side" width="100%" controls id="vid"> |
| 68 | +<source src= {require('../assets/images/kane-ai/features/secrets/kane-ai-secret.mp4').default} type="video/mp4" /> |
| 69 | +</video> |
| 70 | + |
| 71 | +## How to use your Secrets? |
| 72 | +Once created, you can now reference any secret variables in your test steps using **double-curly braces syntax (e.g.,`{{email}}`)**. |
| 73 | + |
| 74 | +> To use a previously created variable in any subsequent step or test case, reference the variable using the same `{{` syntax. This will list down all existing variables for this test. |
| 75 | +
|
| 76 | +Format: |
| 77 | +```bash |
| 78 | +use the value of {{secrets.user.email}} in the email text field |
| 79 | +``` |
| 80 | + |
| 81 | +<video class="right-side" width="100%" controls id="vid"> |
| 82 | +<source src= {require('../assets/images/kane-ai/features/secrets/use-secrets.mp4').default} type="video/mp4" /> |
| 83 | +</video> |
| 84 | + |
| 85 | +## How to Update your Secrets? |
| 86 | +**Step 1:** Navigate to the Test Manager. <br /> |
| 87 | +**Step 2:** Click on the settings icon > Secrets.<br /> |
| 88 | +**Step 3:** Click on the **pencli** icon to update that respective secret value.<br /> |
| 89 | +**Step 4:** Provide the secret value and click on the **Update secret** button. |
| 90 | + |
| 91 | +<img loading="lazy" src= {require('../assets/images/kane-ai/features/secrets/update-secret.png').default} alt="Image" className="doc_img"/> |
| 92 | + |
| 93 | +## How to Delete your Secrets? |
| 94 | +**Step 1:** Navigate to the Test Manager. <br /> |
| 95 | +**Step 2:** Click on the settings icon > Secrets.<br /> |
| 96 | +**Step 3:** Click on the **delete** icon to update that respective secret value.<br /> |
| 97 | +**Step 4:** Provide the secret value and click on the confirmation button. |
| 98 | + |
| 99 | +<img loading="lazy" src= {require('../assets/images/kane-ai/features/secrets/delete-secret.png').default} alt="Image" className="doc_img"/> |
0 commit comments