testform policy
testform [global options] policy [options]The testform policy command inspects, enables, or disables governance and validation policies for the current workspace, covering both built-in system policies and custom policies defined locally or loaded via shared modules.
List Policies
Section titled “List Policies”Run the command without flags to view the full policy table:
$ testform policy
ID SCOPE TYPE STATUS DESCRIPTION────────────────────────────── ─────────────────────────── ──────── ────────── ──────────────────────────────duplicate-testruns-in-testplan testplan system enabled Prevents duplicate testruns inside the same or across testplansidentity-required testcase, testrun, testplan system enabled Enforces identity tags (@tc-X, @tr-X, @tp-X)identity-unique testcase, testrun, testplan system enabled Verifies identity tag uniqueness within scopeno-feature-tags testcase, testrun, testplan system enabled Restricts non-standard tags at the Feature levelrequired-fields testcase, testrun, testplan system enabled Ensures required fields defined in configuration are presentrequired-gherkin testcase system enabled Validates required Gherkin structure and keywords (Given, When, Then)undeclared-fields testcase system enabled Warns about scenario fields not declared in configurationAvailable Options
Section titled “Available Options”| Option | Description |
|---|---|
--enable <id> |
Enable the specified policy and save to main.yml. |
--disable <id> |
Disable the specified policy and save exclusion to main.yml. |
--show <id> |
Display detailed description and scope for a policy. |
-s, --scope <scope> |
Filter policies by resource scope (testcase, testrun, testplan). |
--json |
Output policies in machine-readable JSON format. |
-C, --chdir <dir> |
Switch working directory before executing the command. |
Disabling a Policy (--disable)
Section titled “Disabling a Policy (--disable)”If a built-in or custom policy is too strict for your current migration or workflow:
$ testform policy --disable required-gherkin
Policy "required-gherkin" has been disabled.Updated configuration in main.ymlTestform automatically updates the policies block in main.yml:
policies: disabled: - required-gherkinFrom this point on, testform validate and testform plan will skip this rule during execution.
Enabling a Policy (--enable)
Section titled “Enabling a Policy (--enable)”To re-enable a previously disabled policy:
$ testform policy --enable required-gherkin
Success! Policy "required-gherkin" has been enabled.Updated configuration in main.ymlInspect Details (--show)
Section titled “Inspect Details (--show)”View technical details for a specific policy:
$ testform policy --show identity-required
Policy: identity-required Type: system (built-in) Scope: testcase, testrun, testplan Status: enabled Description: Enforces identity tags (@tc-X, @tr-X, @tp-X)Scope Filtering (--scope)
Section titled “Scope Filtering (--scope)”Filter policies by targeted resource type:
$ testform policy --scope testcaseJSON Output (--json)
Section titled “JSON Output (--json)”Ideal for CI/CD pipelines, custom linters, and quality gates:
$ testform policy --json