testform report
testform [global options] report <type> [options]The testform report command compiles multi-dimensional analytical reports from the execution ledger (testform.state). It features a decoupled architecture that separates metric aggregation from output rendering, offering native export to Markdown, JSON, CSV, Word (.docx), and Excel (.xlsx), along with dynamic template patching and convention-based autoloading.
Command Options
Section titled “Command Options”| Option | Default | Description |
|---|---|---|
<type> |
(Required) | Report type identifier to execute (see Report Catalog). |
-format=<format> |
md |
Output format: md, json, csv, xlsx, docx, or custom format. |
-out=path |
stdout |
Destination file path to save the generated report. |
-filter=<query> |
— | Unified filter by attribute (key=val) or inferred free-text. Can be repeated. |
-target=<resource> |
— | Scopes the report to a specific resource (@tr-N, @tp-N, path). When targeting a testplan, automatically expands all linked test runs. |
-groupBy=<field> |
— | Groups results dynamically by a specified field (status, label, assignee, etc.). |
-template=path |
— | Path to a custom template file (Word .docx, Excel .xlsx, or text). |
-var='k=v' |
— | Injects or overrides variable values for template interpolation. |
-var-file=path |
— | Loads variable values from a YAML file (vars.yml). |
Core report catalog
Section titled “Core report catalog”Testform includes 9 built-in report types categorized by scope, plus a raw data extractor (raw):
1. Scope: Test Cases (testcase)
Section titled “1. Scope: Test Cases (testcase)”testcase-summary: Complete inventory of test cases with status, labels, assignee, and priority.test-case-activity: Chronological activity log, recent executions, and test case trends.
2. Scope: Test Runs (testrun)
Section titled “2. Scope: Test Runs (testrun)”testrun-summary: High-level execution analytics (Total Test Runs,Passed,Failed,Blocked,Skipped,Unexecuted) and pass rate percentage (passRate).testrun-detailed: Granular, step-by-step breakdown of individual test runs and associated scenarios.
3. Scope: Test Plans (testplan)
Section titled “3. Scope: Test Plans (testplan)”testplan-summary: Overall progress across test plans and consolidated status of linked test runs.
4. Cross-Scope & Quality Metrics
Section titled “4. Cross-Scope & Quality Metrics”defects: Audit list of failed and blocked tests, linking defect tags and issue trackers.traceability: Bidirectional traceability matrix between requirements/business tags and test runs.coverage: Percentage of coverage and passed tests grouped by functional tags or components.two-dimensional: Cross-tabulation contingency matrix (e.g. Status vs. Priority or Component).raw: Direct dump of the filtered item collection for custom external pipelines.
Unified filtering and grouping (StateQuery)
Section titled “Unified filtering and grouping (StateQuery)”The report command shares the query engine with testform query:
1. Filtering by Attributes (key=value)
Section titled “1. Filtering by Attributes (key=value)”# Filter failed executions onlytestform report testcase-summary -filter "status=failed"
# Filter by label and assignee simultaneouslytestform report testrun-summary -filter "label=@smoke" -filter "assignee=flavio"2. Filtering by Custom Fields (main.yml)
Section titled “2. Filtering by Custom Fields (main.yml)”If your project defines custom scenario fields such as priority, sprint, or component:
testform report testcase-summary -filter "priority=high" -filter "sprint=SP-24"3. Inferred Free-Text Search (without =)
Section titled “3. Inferred Free-Text Search (without =)”Any query without an = operator is automatically evaluated as a text search across IDs, titles, and tags:
testform report testcase-summary -filter "login"4. Dynamic Grouping (-groupBy)
Section titled “4. Dynamic Grouping (-groupBy)”Automatically groups table rows by the specified attribute:
testform report testcase-summary -groupBy statustestform report coverage -groupBy labelTarget scoping (-target)
Section titled “Target scoping (-target)”The -target flag limits the scope of the report to a specific entity and its execution dependencies:
1. Targeting a Test Run (-target="@tr-N")
Section titled “1. Targeting a Test Run (-target="@tr-N")”Generates the report considering exclusively the designated test run and its executed test cases:
# Step-by-step detail for test run @tr-1 onlytestform report testrun-detailed -target="@tr-1"
# Summary of test cases executed in sprint1.run.featuretestform report testcase-summary -target="sprint1.run.feature"2. Targeting a Test Plan with Multiple Runs (-target="@tp-N")
Section titled “2. Targeting a Test Plan with Multiple Runs (-target="@tp-N")”When targeting a test plan (testplan), Testform inspects linked runs (attributes.testruns), automatically discovers all associated test runs, and includes all test case executions belonging to them:
# Summary of all test runs belonging to test plan @tp-1testform report testrun-summary -target="@tp-1"
# Defect report isolated to test plan @tp-1testform report defects -target="@tp-1"
# Coverage matrix for release plantestform report coverage -target="tests/plans/release-v2.plan.feature"3. Combining -target with -filter
Section titled “3. Combining -target with -filter”You can combine -target to anchor the plan/run and -filter to refine the output:
# View only failed scenarios within plan @tp-2testform report testrun-detailed -target="@tp-2" -filter "status=failed"Native output formats
Section titled “Native output formats”Markdown (-format=md)
Section titled “Markdown (-format=md)”Generates standard Markdown tables with metric highlights. Ideal for stdout, CI/CD build consoles, or GitHub Actions PR summaries.
testform report testrun-summary -format=mdJSON (-format=json)
Section titled “JSON (-format=json)”Outputs a normalized data structure with title, metrics, headers, and rows. Suitable for dashboard ingestion or downstream scripts.
testform report defects -format=json -out=dist/defects.jsonCSV (-format=csv)
Section titled “CSV (-format=csv)”Exports tabular data conforming to RFC 4180 standards for spreadsheet import or BI analytics.
testform report traceability -format=csv -out=traceability.csvWord Document (-format=docx)
Section titled “Word Document (-format=docx)”Generates an executive Word document with styled headings, highlighted metric callouts, and formatted tables.
testform report testrun-summary -format=docx -out=executive-report.docxExcel Workbook (-format=xlsx)
Section titled “Excel Workbook (-format=xlsx)”Generates a spreadsheet workbook with automatic column width adjustment, styled metric cards, and table borders.
testform report coverage -format=xlsx -out=coverage.xlsxDynamic templates with ${...} syntax
Section titled “Dynamic templates with ${...} syntax”To maintain complete consistency with Testform variable resolution and avoid syntax collisions, all Word and Excel templates use standard ${...} placeholders:
| Placeholder | Description | Example Resolution |
|---|---|---|
${var.<name>} |
Environment or project variable loaded from vars.yml or -var. |
${var.company} -> ACME Corp |
${report.title} |
Active report title. | ${report.title} -> Test Run Summary |
${date} |
Report generation timestamp. | ${date} -> 2026-10-26 14:30:00 |
${<metric>} |
Key-value report metric (total, passed, failed, etc.). |
${total} -> 45 |
${table} or ${report.table} |
Dynamic table anchor. Replaced by the generated dataset table. | Table with headers and rows |
testform report testrun-summary -format=docx -template=templates/qa-report.docx -var="company=FinTech Corp" -out=report.docxExtensibility and autoloading from .testform/reports/
Section titled “Extensibility and autoloading from .testform/reports/”You can register custom reports, custom output formats, or default project templates without touching main.yml:
my-project/├── .testform/│ └── reports/│ ├── report.docx # Default Word template for the project│ ├── report.xlsx # Default Excel template for the project│ ├── sprint-metrics.ts # Custom report: "testform report sprint-metrics"│ └── slack.format.ts # Custom format: "testform report ... -format=slack"├── main.yml└── tests/See the Reports API Reference for development contracts, type definitions, and code examples.
CI/CD Integration (GitHub Actions)
Section titled “CI/CD Integration (GitHub Actions)”- name: Generate QA Report run: | # Publish Markdown summary to GitHub Job Summary testform report testrun-summary -format=md >> $GITHUB_STEP_SUMMARY
# Generate formal executive Word document testform report testrun-summary -format=docx -out=dist/executive-report.docx
- name: Upload Executive Report uses: actions/upload-artifact@v4 with: name: executive-qa-report path: dist/executive-report.docx