Test and Validate
Testform provides static analysis and predictive verification tools before launching browsers or firing API traffic: testform validate and testform plan.
1. Static Validation (testform validate)
Section titled “1. Static Validation (testform validate)”The testform validate command verifies the syntax, schema consistency, and internal relationships across all project files without touching browser engines or reading state:
testform validateStatic Checks Performed:
Section titled “Static Checks Performed:”- YAML Syntax: Checks structure of
main.yml,data.yml,variables.yml,locals.yml, andoutputs.yml. - Gherkin Lexer: Ensures all
.featurefiles comply with BDD syntax. - Circular Cycle Prevention: Analyzes
@depends_ondirected graphs to detect cycles ($A \rightarrow B \rightarrow A$). - Module Target Resolution: Confirms paths referenced in
@module(source="...")exist and resolve cleanly. - Interpolation Syntax: Validates
${var.*},${data.*}, and${local.*}expression grammar.
When successful:
Success! The configuration is valid.2. Predictive Planning (testform plan)
Section titled “2. Predictive Planning (testform plan)”Before updating state or triggering test executions, testform plan produces an execution preview:
testform planThe planner reconciles declared code against the stored ledger (testform.state) and outputs exact planned actions:
Testform will perform the following actions:
# auth/login.feature.@login_success will be created + testcase "auth/login.feature.@login_success" { + title = "Successful user login" + provider = "playwright" }
# checkout/payment.feature.@stripe will be updated ~ testcase "checkout/payment.feature.@stripe" { ~ steps = 5 -> 6 }
Plan: 1 to create, 1 to update, 0 to destroy.Freezing Plans with Files (-out)
Section titled “Freezing Plans with Files (-out)”Freeze planned executions to guarantee that CI/CD pipelines run the exact approved plan:
testform plan -out=testform.plan.binarytestform apply testform.plan.binary