-
Notifications
You must be signed in to change notification settings - Fork 42
KaneAI Network Assertion #2085
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
KaneAI Network Assertion #2085
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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.
Binary file added
BIN
+308 KB
assets/images/kane-ai/features/network-assertions/network-assertion-block.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+107 KB
assets/images/kane-ai/features/network-assertions/network-assertion-button.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+146 KB
assets/images/kane-ai/features/network-assertions/network-log-headers.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+119 KB
assets/images/kane-ai/features/network-assertions/network-log-response.png
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.
Binary file added
BIN
+85.9 KB
assets/images/kane-ai/features/network-assertions/network-req-variable.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed
BIN
-94.8 KB
assets/images/mobile-app-testing/ai_thinking_suggestions_test_cases_generation.png
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-80.4 KB
assets/images/mobile-app-testing/edit_suggested_test_cases_steps.png
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,83 @@ | ||
| --- | ||
| id: kane-ai-network-assertions | ||
| title: Network Logs Assertions | ||
| hide_title: false | ||
| sidebar_label: Network Logs Assertions | ||
| description: In this detailed guide, you will learn how you can add network logs assertions in your tests. | ||
| keywords: | ||
| - network | ||
| - network logs assertion | ||
| - assertion | ||
| - lambdatest kaneai | ||
| url: https://www.lambdatest.com/support/docs/kane-ai-network-assertions | ||
| site_name: LambdaTest | ||
| slug: kane-ai-network-assertions/ | ||
| --- | ||
|
|
||
| import Tabs from '@theme/Tabs'; | ||
| import TabItem from '@theme/TabItem'; | ||
|
|
||
| <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": "ANetwork Assertions", | ||
| "item": "https://www.lambdatest.com/support/docs/kane-ai-network-assertions" | ||
| }] | ||
| }) | ||
| }} | ||
| ></script> | ||
| # Network Logs Assertions | ||
| The **Network Logs Assertions** feature in KaneAI enables you to test and validate the behavior of your application at the **network layer**. | ||
| This is useful when you need to ensure that API calls, response codes, payloads, or request timings meet expected conditions during your test executions. | ||
|
|
||
| # Let's see how to add Network Logs Assertions in a Test | ||
|
|
||
| - **Start a test session** (Desktop or Mobile Web). | ||
|
|
||
| - All network calls are automatically recorded in the background as you navigate through your application, you can see the Network calls made so far through the **Assert Network Logs** option available in the " / " commands. | ||
|
|
||
| <img loading="lazy" src={require('../assets/images/kane-ai/features/network-assertions/hit-network-req.png').default} alt="Image" className="doc_img img_center"/> | ||
|
|
||
| <img loading="lazy" src={require('../assets/images/kane-ai/features/network-assertions/network-assertion-button.png').default} alt="Image" className="doc_img img_center"/> | ||
|
|
||
| - Here you will find all the Network requests made in this session so far and **having the Json data format**, you can filter the requests on basis of **Status Code** or **HTTP Methods**: | ||
|
|
||
| <img loading="lazy" src={require('../assets/images/kane-ai/features/network-assertions/network-logs.png').default} alt="Image" className="doc_img img_center"/> | ||
|
|
||
| - You can select specific keys from the **Request Headers**, or add entire **Request** or **Response blocks** in the assertion by clicking on `Add Assertion`. All chosen values are validated in a single step. | ||
|
|
||
| <img loading="lazy" src={require('../assets/images/kane-ai/features/network-assertions/network-log-headers.png').default} alt="Image" className="doc_img img_center"/> | ||
|
|
||
| <img loading="lazy" src={require('../assets/images/kane-ai/features/network-assertions/network-log-response.png').default} alt="Image" className="doc_img img_center"/> | ||
|
|
||
| - Once added, the request will be stored as a **variable**. KaneAI then makes assertions based on this variable. | ||
|
|
||
| <img loading="lazy" src={require('../assets/images/kane-ai/features/network-assertions/network-assertion-block.png').default} alt="Image" className="doc_img img_center"/> | ||
|
|
||
| #### How to validate a specific object in request or response of an API? | ||
|
|
||
| - You can reuse the request later in your test using the familiar `{{variable}}` syntax. | ||
|
|
||
| <img loading="lazy" src={require('../assets/images/kane-ai/features/network-assertions/network-req-variable.png').default} alt="Image" className="doc_img img_center"/> | ||
|
|
||
| - The stored variable is in **JSON format**, so you can easily access nested values with dot-notation (e.g., `header.status`). | ||
|
|
||
| <img loading="lazy" src={require('../assets/images/kane-ai/features/network-assertions/child-variables.png').default} alt="Image" className="doc_img img_center"/> | ||
|
|
||
| :::note | ||
| This feature is not enabled for all users. Please contact our support team to request access. | ||
| ::: | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.