---
title: "Extracted Value Assertion for API Tests"
slug: "extracted-value-assertion-for-api-tests"
description: "In this Test Modeller feature video, you will learn how to form an assertion on extracted JSON values for API tests."
tags: ["Automated Test Execution", "API Automation", "Get Started", "Test Modeller"]
updated: 2024-09-27T14:10:15Z
published: 2024-09-27T14:10:15Z
canonical: "knowledge.curiositysoftware.ie/extracted-value-assertion-for-api-tests"
---

> ## Documentation Index
> Fetch the complete documentation index at: https://knowledge.curiositysoftware.ie/llms.txt
> Use this file to discover all available pages before exploring further.

# Extracted Value Assertion for API Tests

In this Quality Modeller feature video, you will learn how to form an assertion on extracted JSON values for API tests.

Additionally, [**check out our QuickStart API Automation guide!**](/docs/quickstart-api-automation)

**[Embedded content](https://www.youtube.com/embed/Vwqg1QSvWaE?&amp;wmode=opaque&amp;rel=0)**

To get started with this demo, we have a module with an**API Request** set-up. Open up your own module with an**API Request,**to do this, navigate to the**Explorer in Quality Modeller**, Open a Module and then hit the **Blue Action button.**

![](https://cdn.document360.io/77f722a6-2d0a-49fa-8074-572515a6c4b8/Images/Documentation/image-1680272397946.png)![](https://cdn.document360.io/77f722a6-2d0a-49fa-8074-572515a6c4b8/Images/Documentation/image-1680272403078.png)

This will open the**Edit Function**menu for your module, from here open the **API Request tab** and then navigate to**Assertions.**

![](https://cdn.document360.io/77f722a6-2d0a-49fa-8074-572515a6c4b8/Images/Documentation/image-1680272408677.png)

In the **Assertions tab**, you can add new Assertions by hitting the**Add button.**Here, you will be able to add two new types of Assertions, as shown in the demo you can add **JSON Path and Custom Code assertions.**

![](https://cdn.document360.io/77f722a6-2d0a-49fa-8074-572515a6c4b8/Images/Documentation/image-1680272414847.png)![](https://cdn.document360.io/77f722a6-2d0a-49fa-8074-572515a6c4b8/Images/Documentation/image-1680272422047.png)

This will propagate in the module, and you can view the results by hitting the**Generate button.** This will show you the generated code, including the JSON path and Custom code assertions we just set up.

![](https://cdn.document360.io/77f722a6-2d0a-49fa-8074-572515a6c4b8/Images/Documentation/image-1680272427359.png)![](https://cdn.document360.io/77f722a6-2d0a-49fa-8074-572515a6c4b8/Images/Documentation/image-1680272432025.png)

## Related

- [Automating Tests](/automating-and-executing-tests-in-test-modeller.md)
- [Quality Modeller 101](/test-modeller-101.md)
- [QuickStart API Automation](/quickstart-api-automation.md)
