JSON report#

A JSON report of a test session can be generated after the session has completed:

$ canary run ./basic
...
$ canary report json create
$ cat canary.json
{
  "4b172fcef2eb368584aeec8abc4f7409dda7c131d4bd5a1d99d79af9726619cc": {
    "status": {
      "category": "PASS",
      "outcome": 0,
      "reason": "",
      "code": 0
    },
    "state": {
      "phase": "DONE"
    },
    "measurements": {
      "data": {
        "command_line": "/home/docs/checkouts/readthedocs.org/user_builds/canary-wm/envs/latest/bin/python first.pyt",
        "duration": 0.3021249771118164,
        "samples": 4,
        "cpu_percent": {
          "min": 0.0,
          "max": 109.5,
          "ave": 52.25
        },
        "memory_rss_mb": {
          "min": 0.0,
          "max": 32.40625,
          "ave": 13.849609375
        },
        "memory_vms_mb": {
          "min": 0.0,
          "max": 38.9609375,
          "ave": 18.3154296875
        },
        "num_threads": {
          "min": 1,
          "max": 1,
          "ave": 1.0
        }
      }
    },
    "timekeeper": {
      "submitted": 1780605823.2037983,
      "started": 1780605823.2086854,
      "finished": 1780605823.5193083,
      "mark": -1.0
    },
    "spec": {
      "file_root": "/home/docs/checkouts/readthedocs.org/user_builds/canary-wm/checkouts/latest/src/canary/examples/basic",
      "file_path": "first/first.pyt",
      "id": "4b172fcef2eb368584aeec8abc4f7409dda7c131d4bd5a1d99d79af9726619cc",
      "family": "first",
      "stdout": "canary-out.txt",
      "stderr": null,
      "dependencies": [],
      "parameters": {},
      "attributes": {},
      "keywords": [
        "basic"
      ],
      "assets": [],
      "baseline": [],
      "artifacts": [
        {
          "pattern": "testcase.lock",
          "when": "always"
        },
        {
          "pattern": "canary-out.txt",
          "when": "always"
        }
      ],
      "exclusive": false,
      "timeout": 300.0,
      "xstatus": 0,
      "preload": null,
      "modules": [],
      "rcfiles": [],
      "owners": [],
      "environment": {},
      "meta_parameters": {
        "runtime": 300.0
      },
      "command": [
        "/home/docs/checkouts/readthedocs.org/user_builds/canary-wm/envs/latest/bin/python",
        "first.pyt"
      ],
      "mask": {
        "value": false,
        "reason": null
      },
      "exec_path": "first/first",
      "view_path": "first/first"
    },
    "workspace": {
      "root": "/home/docs/checkouts/readthedocs.org/user_builds/canary-wm/checkouts/latest/src/canary/examples/.canary/sessions/2026-06-04T20-43-42.883175",
      "path": "first/first",
      "session": "2026-06-04T20-43-42.883175"
    },
    "dependencies": [],
    "variables": {
      "PYTHONPATH": "/home/docs/checkouts/readthedocs.org/user_builds/canary-wm/checkouts/latest/src/canary/examples/.canary/sessions/2026-06-04T20-43-42.883175/first/first:",
      "PATH": "/home/docs/checkouts/readthedocs.org/user_builds/canary-wm/checkouts/latest/src/canary/examples/.canary/sessions/2026-06-04T20-43-42.883175/first/first:/home/docs/checkouts/readthedocs.org/user_builds/canary-wm/envs/latest/bin:/home/docs/.asdf/shims:/home/docs/.asdf/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
    },
    "resources": {},
    "rparameters": {
      "cpus": 1,
      "gpus": 0,
      "nodes": 1
    },
    "mask": null
  },
  "b1f18b409e6d4e06a34c9601f7ba4dbb3f96c16647aa20bdc736dfd9378f678d": {
    "status": {
      "category": "PASS",
      "outcome": 0,
      "reason": "",
      "code": 0
    },
    "state": {
      "phase": "DONE"
    },
    "measurements": {
      "data": {
        "command_line": "/home/docs/checkouts/readthedocs.org/user_builds/canary-wm/envs/latest/bin/python second.pyt",
        "duration": 0.3021981716156006,
        "samples": 4,
        "cpu_percent": {
          "min": 0.0,
          "max": 99.6,
          "ave": 52.275
        },
        "memory_rss_mb": {
          "min": 0.0,
          "max": 32.6328125,
          "ave": 13.427734375
        },
        "memory_vms_mb": {
          "min": 0.0,
          "max": 38.95703125,
          "ave": 18.08984375
        },
        "num_threads": {
          "min": 1,
          "max": 1,
          "ave": 1.0
        }
      }
    },
    "timekeeper": {
      "submitted": 1780605823.557261,
      "started": 1780605823.5628335,
      "finished": 1780605823.871677,
      "mark": -1.0
    },
    "spec": {
      "file_root": "/home/docs/checkouts/readthedocs.org/user_builds/canary-wm/checkouts/latest/src/canary/examples/basic",
      "file_path": "second/second.pyt",
      "id": "b1f18b409e6d4e06a34c9601f7ba4dbb3f96c16647aa20bdc736dfd9378f678d",
      "family": "second",
      "stdout": "canary-out.txt",
      "stderr": null,
      "dependencies": [],
      "parameters": {},
      "attributes": {},
      "keywords": [
        "basic",
        "second"
      ],
      "assets": [
        {
          "src": "/home/docs/checkouts/readthedocs.org/user_builds/canary-wm/checkouts/latest/src/canary/examples/basic/second/add.py",
          "dst": null,
          "action": "link"
        }
      ],
      "baseline": [],
      "artifacts": [
        {
          "pattern": "testcase.lock",
          "when": "always"
        },
        {
          "pattern": "canary-out.txt",
          "when": "always"
        }
      ],
      "exclusive": false,
      "timeout": 300.0,
      "xstatus": 0,
      "preload": null,
      "modules": [],
      "rcfiles": [],
      "owners": [],
      "environment": {},
      "meta_parameters": {
        "runtime": 300.0
      },
      "command": [
        "/home/docs/checkouts/readthedocs.org/user_builds/canary-wm/envs/latest/bin/python",
        "second.pyt"
      ],
      "mask": {
        "value": false,
        "reason": null
      },
      "exec_path": "second/second",
      "view_path": "second/second"
    },
    "workspace": {
      "root": "/home/docs/checkouts/readthedocs.org/user_builds/canary-wm/checkouts/latest/src/canary/examples/.canary/sessions/2026-06-04T20-43-42.883175",
      "path": "second/second",
      "session": "2026-06-04T20-43-42.883175"
    },
    "dependencies": [],
    "variables": {
      "PYTHONPATH": "/home/docs/checkouts/readthedocs.org/user_builds/canary-wm/checkouts/latest/src/canary/examples/.canary/sessions/2026-06-04T20-43-42.883175/second/second:",
      "PATH": "/home/docs/checkouts/readthedocs.org/user_builds/canary-wm/checkouts/latest/src/canary/examples/.canary/sessions/2026-06-04T20-43-42.883175/second/second:/home/docs/checkouts/readthedocs.org/user_builds/canary-wm/envs/latest/bin:/home/docs/.asdf/shims:/home/docs/.asdf/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
    },
    "resources": {},
    "rparameters": {
      "cpus": 1,
      "gpus": 0,
      "nodes": 1
    },
    "mask": null
  }
}