diff --git a/assets/images/kane-ai/features/network-assertions/child-variables.png b/assets/images/kane-ai/features/network-assertions/child-variables.png new file mode 100644 index 000000000..21433f47a Binary files /dev/null and b/assets/images/kane-ai/features/network-assertions/child-variables.png differ diff --git a/assets/images/kane-ai/features/network-assertions/hit-network-req.png b/assets/images/kane-ai/features/network-assertions/hit-network-req.png new file mode 100644 index 000000000..2309e7893 Binary files /dev/null and b/assets/images/kane-ai/features/network-assertions/hit-network-req.png differ diff --git a/assets/images/kane-ai/features/network-assertions/network-assertion-block.png b/assets/images/kane-ai/features/network-assertions/network-assertion-block.png new file mode 100644 index 000000000..925017066 Binary files /dev/null and b/assets/images/kane-ai/features/network-assertions/network-assertion-block.png differ diff --git a/assets/images/kane-ai/features/network-assertions/network-assertion-button.png b/assets/images/kane-ai/features/network-assertions/network-assertion-button.png new file mode 100644 index 000000000..2df500c82 Binary files /dev/null and b/assets/images/kane-ai/features/network-assertions/network-assertion-button.png differ diff --git a/assets/images/kane-ai/features/network-assertions/network-log-headers.png b/assets/images/kane-ai/features/network-assertions/network-log-headers.png new file mode 100644 index 000000000..c43409eb6 Binary files /dev/null and b/assets/images/kane-ai/features/network-assertions/network-log-headers.png differ diff --git a/assets/images/kane-ai/features/network-assertions/network-log-response.png b/assets/images/kane-ai/features/network-assertions/network-log-response.png new file mode 100644 index 000000000..855d8d779 Binary files /dev/null and b/assets/images/kane-ai/features/network-assertions/network-log-response.png differ diff --git a/assets/images/kane-ai/features/network-assertions/network-logs.png b/assets/images/kane-ai/features/network-assertions/network-logs.png new file mode 100644 index 000000000..04fa91565 Binary files /dev/null and b/assets/images/kane-ai/features/network-assertions/network-logs.png differ diff --git a/assets/images/kane-ai/features/network-assertions/network-req-variable.png b/assets/images/kane-ai/features/network-assertions/network-req-variable.png new file mode 100644 index 000000000..01abceec0 Binary files /dev/null and b/assets/images/kane-ai/features/network-assertions/network-req-variable.png differ diff --git a/assets/images/mobile-app-testing/generate_with_ai_button.png b/assets/images/mobile-app-testing/generate_with_ai_button.png index 8bd409072..5bfb97f14 100644 Binary files a/assets/images/mobile-app-testing/generate_with_ai_button.png and b/assets/images/mobile-app-testing/generate_with_ai_button.png differ diff --git a/docs/kane-ai-network-assertions.md b/docs/kane-ai-network-assertions.md new file mode 100644 index 000000000..f3ade6ca9 --- /dev/null +++ b/docs/kane-ai-network-assertions.md @@ -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'; + + +# 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. + +Image + +- 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**: + +Image + +- Select the specific key's that you want to add in the assertion from the **Request Headers**. + +Image + +- To add **Request** or **Response blocks** in assertions click on the `Add Assertion` button. All the chosen values will be validated in a single step. + +Image + +- Once added, the request will be stored as a **variable**. KaneAI then makes assertions based on this variable. + +Image + +#### 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. + +Image + +- The stored variable is in **JSON format**, so you can easily access nested values with dot-notation (e.g., `header.status`). + +Image + +:::note +This feature is not enabled for all users. Please contact our support team to request access. +::: \ No newline at end of file diff --git a/sidebars.js b/sidebars.js index 98ea48494..9722b0559 100644 --- a/sidebars.js +++ b/sidebars.js @@ -1292,6 +1292,8 @@ module.exports = { "kane-ai-scroll-in-feature", "kane-ai-jira-integration", "kane-ai-api-testing", + "kane-ai-network-assertions", + "kaneai-network-throttling", "kane-ai-modules", "kaneai-modules-versions-and-enhancement", "kaneai-upload-and-download-files",