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
  • Getting started
  • Package your software
  • Make it go
  • Deploy to Antithesis
  • Launch a test run
  • User manual
  • Properties and Assertions
  • Properties in Antithesis
  • Assertions in Antithesis
  • Properties to Test For
  • Sometimes Assertions
  • Test Composer
  • Test Composer Basics
  • Test Composer Reference
  • Principles of Test Composition
  • Checking Test Templates Locally
  • Webhooks
  • Launching a test
  • Retrieving logs
  • Launching a debugging session
  • Webhook API
  • Reports
  • Triage report
  • Bug report
  • Multiverse debugging
  • Overview
  • Exploring the multiverse
  • Querying with event sets
  • The Environment and its utilities
  • Using the Antithesis Notebook
  • Cookbook
  • The Environment and Multiverse
  • The Antithesis Environment
  • Fault Injection
  • CPUID
  • Reference
  • Handling External Dependencies
  • 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
  • Languages not listed above
  • Assert (reference)
  • Lifecycle (reference)
  • Tooling integrations
  • CI integration
  • Discord and Slack integrations
  • Configuring Antithesis
  • Instrumentation
  • User management
  • Sizing your deployment
  • Best practices
  • Is Antithesis working?
  • Optimizing for Antithesis
  • Finding more bugs
  • FAQ
  • About Antithesis POCs
  • Release notes
  • Release notes