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
  • How Antithesis works
  • Get started
  • Test an example system
  • With Docker Compose
  • Build and run an etcd cluster
  • Meet the Test Composer
  • With Kubernetes
  • Build and run an etcd cluster
  • Meet the Test Composer
  • Setup guide
  • For Docker Compose users
  • For Kubernetes users
  • Product
  • Test Composer
  • Test Composer basics
  • Test Composer reference
  • How to check test templates locally
  • How to port tests to Antithesis
  • Reports
  • The triage report
  • Findings
  • Environment
  • Utilization
  • Properties
  • The bug report
  • Context, Instance, & Logs
  • Bug likelihood over time
  • Statistical debug information
  • Search dashboard & multiverse map
  • Multiverse debugging
  • 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
  • Optimizing for Antithesis
  • Docker best practices
  • Kubernetes best practices
  • Concepts
  • Properties and Assertions
  • Properties in Antithesis
  • Assertions in Antithesis
  • Sometimes Assertions
  • Properties to test for
  • Fault injection
  • Reference
  • Webhooks
  • Launching a test in Docker environment
  • Launching a test in Kubernetes environment
  • Launching a debugging session
  • Retrieving logs
  • SDK reference
  • Go
  • Tutorial
  • Instrumentor
  • Assert (reference)
  • Lifecycle (reference)
  • Random (reference)
  • Java
  • Tutorial
  • Instrumentation
  • Assert (reference)
  • Lifecycle (reference)
  • Random (reference)
  • C
  • C++
  • Tutorial
  • C/C++ Instrumentation
  • Assert (reference)
  • Lifecycle (reference)
  • Random (reference)
  • JavaScript
  • Python
  • Tutorial
  • Assert (reference)
  • Lifecycle (reference)
  • Random (reference)
  • Rust
  • Tutorial
  • Instrumentation
  • Assert (reference)
  • Lifecycle (reference)
  • Random (reference)
  • .NET
  • Tutorial
  • Instrumentation
  • Assert (reference)
  • Lifecycle (reference)
  • Random (reference)
  • Languages not listed above
  • Assert (reference)
  • Lifecycle (reference)
  • Assertion Schema
  • Instrumentation
  • Handling external dependencies
  • FAQ
  • Product FAQs
  • About Antithesis POCs
  • Release notes
  • Release notes