---
title: "Assertions index"
description: |
  Index Of Assertion Domains.


  Find the assertion function you need for your data.
weight: 1
---

**The v2 our tests wanted**

The [`testify/v2`][testifyv2] package has a fairly large API surface.

This is in part inherited from the original [`testify`][testifyv1] and also
largely due to the many available variants of the same assertion function.

The following sections organize the assertion API into usage domains,
with all documented exported variants documented in a more concise form than the
[reference godoc documentation](https://pkg.go.dev/github.com/go-openapi/testify/v2).

[![GoDoc][godoc-badge]][godoc-url]
{class="inline-badge"}

## Domains

The `testify` API is organized in 19 logical domains shown below.
Each domain contains assertions regrouped by their use case (e.g. http, json, error).

{{< children type="card" description="true" >}}

---
  
- [Boolean](./boolean.md) - Asserting Boolean Values (4)
- [Collection](./collection.md) - Asserting Slices And Maps (23)
- [Comparison](./comparison.md) - Comparing Ordered Values (12)
- [Condition](./condition.md) - Expressing Assertions Using Conditions (9)
- [Equality](./equality.md) - Asserting Two Things Are Equal (16)
- [Error](./error.md) - Asserting Errors (8)
- [File](./file.md) - Asserting OS Files (6)
- [Http](./http.md) - Asserting HTTP Response And Body (7)
- [Json](./json.md) - Asserting JSON Documents (5)
- [Number](./number.md) - Asserting Numbers (9)
- [Ordering](./ordering.md) - Asserting How Collections Are Ordered (10)
- [Panic](./panic.md) - Asserting A Panic Behavior (4)
- [Safety](./safety.md) - Checks Against Leaked Resources (Goroutines, File Descriptors) (2)
- [String](./string.md) - Asserting Strings (4)
- [Testing](./testing.md) - Mimics Methods From The Testing Standard Library (2)
- [Time](./time.md) - Asserting Times And Durations (2)
- [Type](./type.md) - Asserting Types Rather Than Values (10)
- [Yaml](./yaml.md) - Asserting Yaml Documents (5)
- [Common](./common.md) - Other Uncategorized Helpers (3)

---

Generated with github.com/go-openapi/testify/codegen/v2

[godoc-badge]: https://pkg.go.dev/badge/github.com/go-openapi/testify/v2
[godoc-url]: https://pkg.go.dev/github.com/go-openapi/testify/v2
[testifyv2]: https://github.com/go-openapi/testify
[testifyv1]: https://github.com/stretchr/testify

<!--
SPDX-FileCopyrightText: Copyright 2025 go-swagger maintainers
SPDX-License-Identifier: Apache-2.0


Document generated by github.com/go-openapi/testify/codegen/v2 DO NOT EDIT.
-->
