Antithesis Assertion Schema

The complete assertions JSON schema is as follows:

{
"$schema": "http://json-schema.org/draft-04/schema#",
"$id": "https://antithesis.com/assertions.schema.json",
"title": "Antithesis Assertions",
"description": "This describes the details of an Antithesis assertion",
"type": "object",
"properties": {
"antithesis_assert": {
"description": "Asserts a specific condition value and reachability",
"type": "object",
"properties": {
"id": {
"description": "A unique identifier for an assertion",
"type": "string"
},
"message": {
"description": "Description of the assertion",
"type": "string"
},
"condition": {
"description": "Evaluation of execution state and location",
"type": "boolean"
},
"display_type": {
"description": "User-supplied name of the assertion type, for use in reports.",
"type": "string"
},
"hit": {
"description": "Indicates the assertion was evaluated",
"type": "boolean"
},
"must_hit": {
"description": "True if the assertion is expected to be evaluated at least once to consider it to be passed",
"type": "boolean"
},
"assert_type": {
"description": "Type of assertion that was established",
"type": "string",
"enum": [
"always",
"sometimes",
"reachability"
]
},
"location": {
"description": "Describes physical and logical source code location",
"type": "object",
"properties": {
"file": {
"description": "Filename containing the assertion",
"type": "string"
},
"function": {
"description": "Function or method containing the assertion",
"type": "string"
},
"class": {
"description": "Class or package for the code containing the assertion",
"type": "string"
},
"begin_line": {
"description": "Line number for the assertion",
"type": "number"
},
"begin_column": {
"description": "Column number for the assertion",
"type": "number"
}
}
},
"details": {
"description": "User-provided JSON, for display in reports as additional details. If no additional details are desired, set as null.",
"type": "object",
"patternProperties": {
"^.*$": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "object"
},
{
"type": "array"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
}
}
}
}
}
  • Introduction
  • Welcome to Antithesis
  • How Antithesis works
  • Using Antithesis with AI
  • Get started
  • Setup guide
  • Overview
  • For Docker Compose users
  • For Kubernetes users
  • Test an example system
  • Overview
  • With Docker Compose
  • Overview
  • Build and run an etcd cluster
  • Add a test template
  • With Kubernetes
  • Overview
  • Build and run an etcd cluster
  • Add a test template
  • Product
  • Test templates
  • Overview
  • Creating test templates
  • Test commands
  • How to check a test template locally
  • How to port tests to Antithesis
  • Test launchers
  • The triage report
  • Overview
  • Findings
  • Environment
  • Utilization
  • Properties
  • Logs Explorer & multiverse map
  • Debugging
  • Overview
  • Causality analysis
  • Multiverse debugging
  • Simple Multiverse debugging
  • Advanced
  • Overview
  • The Antithesis multiverse
  • Querying with event sets
  • Environment utilities
  • Using the Antithesis Notebook
  • Cookbook
  • Tooling integrations
  • CI integration
  • Discord and Slack integrations
  • Issue tracker integration - BETA
  • Configuration
  • Access and authentication
  • The Antithesis environment
  • Best practices
  • Docker best practices
  • Kubernetes best practices
  • Optimizing for testing
  • Concepts
  • Properties and Assertions
  • Overview
  • Properties in Antithesis
  • Assertions in Antithesis
  • Sometimes Assertions
  • Properties to test for
  • Fault injection
  • Reference
  • Webhooks
  • Overview
  • Launching a test
  • Launching a debugging session
  • webhook reference
  • Antithesis API
  • Handling external dependencies
  • SDK reference
  • Overview
  • Define test properties
  • Generate randomness
  • Manage test lifecycle
  • Assertion catalog
  • Coverage instrumentation
  • Go
  • Go SDK
  • Instrumentor
  • Tutorial
  • Assert (reference)
  • Lifecycle (reference)
  • Random (reference)
  • Java
  • Java SDK
  • Using the SDK
  • Building your software
  • Tutorial
  • Assert (reference)
  • Lifecycle (reference)
  • Random (reference)
  • C SDK
  • C++
  • C++ SDK
  • C/C++ Instrumentation
  • Tutorial
  • Assert (reference)
  • Lifecycle (reference)
  • Random (reference)
  • JavaScript
  • Python
  • Python SDK
  • Tutorial
  • Assert (reference)
  • Lifecycle (reference)
  • Random (reference)
  • Rust
  • Rust SDK
  • Instrumentation
  • Tutorial
  • Assert (reference)
  • Lifecycle (reference)
  • Random (reference)
  • .NET
  • .NET SDK
  • Instrumentation
  • Tutorial
  • Assert (reference)
  • Lifecycle (reference)
  • Random (reference)
  • Languages not listed above
  • Fallback SDK
  • Assert (reference)
  • Lifecycle (reference)
  • Assertion Schema
  • FAQ
  • Product FAQs
  • About Antithesis POCs
  • Release notes
  • Release notes
  • General reliability resources
  • Reliability glossary
  • Techniques for better software testing
  • Autonomous testing
  • Deterministic simulation testing
  • Property-based testing
  • White paper — How much does an outage cost?
  • Catalog of reliability properties for key-value datastores
  • Catalog of reliability properties for blockchains
  • Test ACID compliance with a ring test