Skip to main content

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.

Test across 3000+ combinations of browsers, real devices & OS.

Book Demo

Help and Support

Related Articles