from retab import Retab
client = Retab()
# All tests for a workflow.
tests = client.workflows.tests.list(
workflow_id="wf_abc123xyz",
limit=50,
)
# Only tests for one specific block.
block_tests = client.workflows.tests.list(
workflow_id="wf_abc123xyz",
target_block_id="block_extract_invoice",
limit=20,
)
print(f"Workflow has {len(tests.tests)} tests")
{
"tests": [
{
"id": "wfnodetest_hsLEQiM61ez9Piv147MWk",
"workflow_id": "wf_abc123xyz",
"organization_id": "org_123",
"target": { "type": "block", "block_id": "block_extract_invoice" },
"source": {
"type": "run_step",
"run_id": "wfrun_def456",
"step_id": "block_extract_invoice"
},
"name": "Q1 invoice total",
"assertion": {
"id": "assert_xyz",
"target": { "output_handle_id": "output-json-0", "path": "total" },
"condition": { "kind": "equals", "expected": 1234.56 },
"label": null
},
"assertion_schema_dep": {
"schema_path": "total",
"subtree_hash": "7d79dd764ab6548d",
"depends_on_root": false
},
"assertion_drift_status": null,
"schema_drift": "fresh",
"schema_drift_detail": null,
"validation_status": "valid",
"validation_issues": [],
"latest_run_summary": {
"run_record_id": "wfnodetestrun_abc123",
"status": "passed",
"started_at": "2026-05-01T13:55:00Z",
"completed_at": "2026-05-01T13:55:18Z",
"duration_ms": 18221,
"workflow_draft_fingerprint": "ddd95baadce6045f",
"block_config_fingerprint": "0ff93ddc7cefcb42",
"assertions_passed": 1,
"assertions_failed": 0,
"blocked_assertions": 0
},
"latest_passing_run_summary": { "...": "as above" },
"latest_failing_run_summary": null,
"created_at": "2026-04-08T14:22:26Z",
"updated_at": "2026-04-08T14:27:52Z"
}
]
}
from retab import Retab
client = Retab()
# All tests for a workflow.
tests = client.workflows.tests.list(
workflow_id="wf_abc123xyz",
limit=50,
)
# Only tests for one specific block.
block_tests = client.workflows.tests.list(
workflow_id="wf_abc123xyz",
target_block_id="block_extract_invoice",
limit=20,
)
print(f"Workflow has {len(tests.tests)} tests")
{
"tests": [
{
"id": "wfnodetest_hsLEQiM61ez9Piv147MWk",
"workflow_id": "wf_abc123xyz",
"organization_id": "org_123",
"target": { "type": "block", "block_id": "block_extract_invoice" },
"source": {
"type": "run_step",
"run_id": "wfrun_def456",
"step_id": "block_extract_invoice"
},
"name": "Q1 invoice total",
"assertion": {
"id": "assert_xyz",
"target": { "output_handle_id": "output-json-0", "path": "total" },
"condition": { "kind": "equals", "expected": 1234.56 },
"label": null
},
"assertion_schema_dep": {
"schema_path": "total",
"subtree_hash": "7d79dd764ab6548d",
"depends_on_root": false
},
"assertion_drift_status": null,
"schema_drift": "fresh",
"schema_drift_detail": null,
"validation_status": "valid",
"validation_issues": [],
"latest_run_summary": {
"run_record_id": "wfnodetestrun_abc123",
"status": "passed",
"started_at": "2026-05-01T13:55:00Z",
"completed_at": "2026-05-01T13:55:18Z",
"duration_ms": 18221,
"workflow_draft_fingerprint": "ddd95baadce6045f",
"block_config_fingerprint": "0ff93ddc7cefcb42",
"assertions_passed": 1,
"assertions_failed": 0,
"blocked_assertions": 0
},
"latest_passing_run_summary": { "...": "as above" },
"latest_failing_run_summary": null,
"created_at": "2026-04-08T14:22:26Z",
"updated_at": "2026-04-08T14:27:52Z"
}
]
}
List all block tests for a workflow. Optionally filter byDocumentation Index
Fetch the complete documentation index at: https://docs.retab.com/llms.txt
Use this file to discover all available pages before exploring further.
target_block_id to
get only the tests that target a specific block.
Each entry in tests is a full WorkflowTest (target, source, assertion,
schema-drift state, latest run summaries). Use this to populate a Tests page or
to check whether a workflow has any tests before offering to run them.
from retab import Retab
client = Retab()
# All tests for a workflow.
tests = client.workflows.tests.list(
workflow_id="wf_abc123xyz",
limit=50,
)
# Only tests for one specific block.
block_tests = client.workflows.tests.list(
workflow_id="wf_abc123xyz",
target_block_id="block_extract_invoice",
limit=20,
)
print(f"Workflow has {len(tests.tests)} tests")
{
"tests": [
{
"id": "wfnodetest_hsLEQiM61ez9Piv147MWk",
"workflow_id": "wf_abc123xyz",
"organization_id": "org_123",
"target": { "type": "block", "block_id": "block_extract_invoice" },
"source": {
"type": "run_step",
"run_id": "wfrun_def456",
"step_id": "block_extract_invoice"
},
"name": "Q1 invoice total",
"assertion": {
"id": "assert_xyz",
"target": { "output_handle_id": "output-json-0", "path": "total" },
"condition": { "kind": "equals", "expected": 1234.56 },
"label": null
},
"assertion_schema_dep": {
"schema_path": "total",
"subtree_hash": "7d79dd764ab6548d",
"depends_on_root": false
},
"assertion_drift_status": null,
"schema_drift": "fresh",
"schema_drift_detail": null,
"validation_status": "valid",
"validation_issues": [],
"latest_run_summary": {
"run_record_id": "wfnodetestrun_abc123",
"status": "passed",
"started_at": "2026-05-01T13:55:00Z",
"completed_at": "2026-05-01T13:55:18Z",
"duration_ms": 18221,
"workflow_draft_fingerprint": "ddd95baadce6045f",
"block_config_fingerprint": "0ff93ddc7cefcb42",
"assertions_passed": 1,
"assertions_failed": 0,
"blocked_assertions": 0
},
"latest_passing_run_summary": { "...": "as above" },
"latest_failing_run_summary": null,
"created_at": "2026-04-08T14:22:26Z",
"updated_at": "2026-04-08T14:27:52Z"
}
]
}