Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/hyperexecute-appium-virtual-device.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
id: hyperexecute-appium-virtual-device
title: Appium Testing - Virtual Device On HyperExecute
sidebar_label: Appium - Virtual Device
description: Maximize Appium test execution with HyperExecute – Explore LambdaTest's support documentation for seamless automation testing.
description: Execute Appium tests on virtual devices using HyperExecute with TestNG and YAML 0.2. Learn setup, configuration, and seamless test execution steps.
keywords:
- appium
- java
Expand Down
107 changes: 107 additions & 0 deletions docs/kane-ai-using-json-variables.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
---
id: kane-ai-using-json-variables
title: KaneAI - Utilizing JSON Variables for Assertions
hide_title: false
sidebar_label: JSON Variables Guide
description: Learn how to use JSON variables in the KaneAI test cases for assertions
keywords:
- lambdatest automation
- lambdatest kaneai
- kaneai scroll elements
- kaneai sidebar scroll
url: https://www.lambdatest.com/support/docs/kane-ai-using-json-variables/
site_name: LambdaTest
slug: kane-ai-using-json-variables/
---

<script type="application/ld+json"
dangerouslySetInnerHTML={{ __html: JSON.stringify({
"@context": "https://schema.org",
"@type": "BreadcrumbList",
"itemListElement": [{
"@type": "ListItem",
"position": 1,
"name": "Home",
"item": "https://www.lambdatest.com"
},{
"@type": "ListItem",
"position": 2,
"name": "Support",
"item": "https://www.lambdatest.com/support/docs/"
},{
"@type": "ListItem",
"position": 3,
"name": "KaneAI Jira Integration",
"item": "https://www.lambdatest.com/support/docs/kane-ai-using-json-variables/"
}]
})
}}
></script>
This document outlines the process of using JSON variables in KaneAI to assert specific objects within an API response. The guide provides a step-by-step procedure for executing API calls, examining responses, and performing assertions on both status and body of the response.

## Prerequisites
- Access to KaneAI platform
- Basic understanding of API testing
- Familiarity with JSON structures

## Step 1: Understanding JSON Variable Assertions
In KaneAI, you can use JSON variables to perform detailed assertions on API responses. This allows you to validate specific objects and elements within the response structure.

## Step 2: Initiating an API Call
- Navigate to your desired API endpoint (e.g., a pet store website)
- Configure the necessary API call parameters
- Execute the API request

### Example Workflow:
- Select the appropriate HTTP method (GET, POST, etc.)
- Add required headers
- Input any necessary request body
- Send the request

<img loading="lazy" src={require('../assets/images/kane-ai/knowledge-base/variables/json-variable/image2.jpg').default} alt="Image" className="doc_img img_center"/>

## Step 3: Accessing Response Variables
After executing the API call, KaneAI automatically generates variables containing:
- Response status code
- Response body
- Response headers
- Other relevant metadata

<img loading="lazy" src={require('../assets/images/kane-ai/knowledge-base/variables/json-variable/image3.jpg').default} alt="Image" className="doc_img img_center"/>

## Step 4: Asserting Response Status
To assert the response status:

- Use double curly braces `{{` to access the variable list
- Navigate using arrow keys to select the status variable
- Define your expected status code

<img loading="lazy" src={require('../assets/images/kane-ai/knowledge-base/variables/json-variable/image4.jpg').default} alt="Image" className="doc_img img_center"/>

### Example:
- Expected status: 200
- If actual status is 500, the assertion will fail

<img loading="lazy" src={require('../assets/images/kane-ai/knowledge-base/variables/json-variable/image5.jpg').default} alt="Image" className="doc_img img_center"/>

## Step 5: Asserting Response Body
Navigate through the response body using the same double curly brace method:
- Open the variable selection menu with `{{`
- Browse to the specific JSON element you want to validate
- Create an assertion for that element

<img loading="lazy" src={require('../assets/images/kane-ai/knowledge-base/variables/json-variable/image6.jpg').default} alt="Image" className="doc_img img_center"/>

### Example Validation:
- Check if 'dogs' element exists in the response
- Verify specific property values
- Validate nested JSON structures

<img loading="lazy" src={require('../assets/images/kane-ai/knowledge-base/variables/json-variable/image7.jpg').default} alt="Image" className="doc_img img_center"/>

<br />

## Video Explanation
<video class="right-side" width="100%" controls id="vid">
<source src= {require('../assets/images/kane-ai/knowledge-base/variables/json-variable.mp4').default} type="video/mp4" />
</video>
2 changes: 1 addition & 1 deletion docs/karate-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ id: karate-report
title: Karate Report
hide_title: false
sidebar_label: Karate
description: Streamline error analysis with the Error Categorization Report. Identify patterns in test failures to enhance quality and efficiency in your testing process.
description: Learn how to configure and generate Karate test execution reports on HyperExecute with step-by-step guidance for seamless test insights and reporting.
keywords:
- cucumber testing reports
- karate report lambdatest
Expand Down
2 changes: 1 addition & 1 deletion docs/lambdatest-sso-pingidentity-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ id: lambdatest-sso-pingidentity-integration
title: LambdaTest SSO & PingIdentity Integration
hide_title: false
sidebar_label: PingIdentity
description: Learn how to automate web app testing with KaneAI. Generate and execute tests in plain English, save cases, and run them seamlessly
description: Integrate LambdaTest with Ping Identity for secure SSO using SAML. Follow step-by-step instructions to configure SP-initiated, IdP-initiated SSO, and group management.
keywords:
- sso
- lambdatest sso
Expand Down
2 changes: 1 addition & 1 deletion docs/real-time-upload-and-download-files.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ id: real-time-upload-and-download-files
title: Upload and Download Files
hide_title: false
sidebar_label: Upload and Download Files
description: Discover how to use the Recents and Favourites feature under Quick Links in LambdaTest. Quickly access recently used items and mark important resources for faster navigation.
description: Easily upload and download files during remote testing with LambdaTest. Manage cross-platform file transfers for seamless workflows across desktop and mobile devices.
keywords:
- real time testing in lambdatest
- lambdatest real time testing feature
Expand Down
2 changes: 1 addition & 1 deletion docs/smartui-handle-sticky-elements.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
id: smartui-handle-sticky-elements
title: Handle Pages with Sticky Elements
sidebar_label: Handle Sticky Elements
description: SmartUI can now perform automated visual testing on pages that implement lazy loading.
description: Ensure accurate visual testing with LambdaTest Smart UI by effectively handling sticky elements. Prevent false positives and maintain consistency across visual snapshots.
keywords:
- lambdatest
- smart ui
Expand Down
11 changes: 10 additions & 1 deletion sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -1070,7 +1070,16 @@ module.exports = {
items: [
"kane-ai-command-guide",
"kane-ai-web-test-writing-guidelines",
"kane-ai-using-variables"
{
type: "category",
collapsed: true,
label: "Variables Guide",
link: {
type: "doc",
id: "kane-ai-using-variables"
},
items: ["kane-ai-using-json-variables"]
},
],
},
{
Expand Down
Loading