Test Cases · JSON Structure

Test Cases Test Result Structure

The outcome of executing a test case, capturing pass/fail status, execution details, and any defects found.

Type: object Properties: 12 Required: 4
API TestingAutomationQuality AssuranceSoftware DevelopmentSoftware TestingTesting

TestResult is a JSON Structure definition published by Test Cases, describing 12 properties, of which 4 are required. It conforms to the https://json-structure.org/meta/core/v0/# meta-schema.

Properties

id test_case_id test_run_id status executed_by executed_at duration_ms environment build_version defects comment step_results

Meta-schema: https://json-structure.org/meta/core/v0/#

JSON Structure

test-cases-test-result-structure.json Raw ↑
{
  "$schema": "https://json-structure.org/meta/core/v0/#",
  "$id": "https://raw.githubusercontent.com/api-evangelist/test-cases/refs/heads/main/json-structure/test-cases-test-result-structure.json",
  "name": "TestResult",
  "description": "The outcome of executing a test case, capturing pass/fail status, execution details, and any defects found.",
  "properties": {
    "id": {
      "description": "Unique identifier for the test result.",
      "type": "string"
    },
    "test_case_id": {
      "description": "Identifier of the test case that was executed.",
      "type": "string"
    },
    "test_run_id": {
      "description": "Identifier of the test run this result belongs to.",
      "type": "string"
    },
    "status": {
      "enum": [
        "passed",
        "failed",
        "blocked",
        "skipped",
        "error"
      ],
      "description": "Overall pass/fail status of the test case execution.",
      "type": "string"
    },
    "executed_by": {
      "description": "Username or identifier of the person or system that executed the test.",
      "type": "string"
    },
    "executed_at": {
      "description": "ISO 8601 timestamp when the test was executed.",
      "type": "datetime"
    },
    "duration_ms": {
      "minimum": 0,
      "description": "Time taken to execute the test case in milliseconds.",
      "type": "int32"
    },
    "environment": {
      "description": "The environment in which the test was executed (e.g., staging, production).",
      "type": "string"
    },
    "build_version": {
      "description": "Software build version under test when this result was recorded.",
      "type": "string"
    },
    "defects": {
      "items": {
        "type": "string"
      },
      "description": "List of defect or bug identifiers found during this test execution.",
      "type": "array"
    },
    "comment": {
      "description": "Tester comments or observations about the test execution.",
      "type": "string"
    },
    "step_results": {
      "items": {
        "$ref": "#/definitions/StepResult"
      },
      "description": "Results for each individual step within the test case.",
      "type": "array"
    }
  },
  "required": [
    "id",
    "test_case_id",
    "status",
    "executed_at"
  ],
  "definitions": {
    "StepResult": {
      "properties": {
        "step_number": {
          "description": "The step number this result corresponds to.",
          "type": "int32"
        },
        "status": {
          "enum": [
            "passed",
            "failed",
            "blocked",
            "skipped"
          ],
          "description": "Status of this individual step.",
          "type": "string"
        },
        "actual_result": {
          "description": "The actual result observed for this step.",
          "type": "string"
        }
      },
      "required": [
        "step_number",
        "status"
      ],
      "type": "object",
      "name": "StepResult"
    }
  },
  "type": "object"
}