Skip to content

testform plan

Ventana de terminal
testform [global options] plan [options]

The testform plan command creates an execution plan. It evaluates your local .feature files against the current state file (testform.state) and remote infrastructure, calculating the exact set of actions required to bring remote issues into alignment with local code.

It is a speculative, read-only operation that does not make any mutations to remote resources.

Option Default Description
-out=path — Writes the generated execution plan to a file. This plan can be passed to apply to guarantee identical execution.
-destroy false Generates a plan to destroy all managed resources rather than applying updates.
-refresh=false true Skips checking the remote API for out-of-band drift prior to planning.
-target=address — Limits planning to a single resource identity (e.g. login.case.feature.@tc-1). May be specified multiple times.
-json false Emits the plan in JSON format.
-detailed-exitcode false Returns detailed exit codes (0 = empty plan, 2 = changes present).

Actions are indicated by standard Terraform diff symbols:

  • + create: Resource exists locally but has not yet been provisioned remotely.
  • ~ update in-place: Resource exists remotely, but local attributes (title, steps, labels, fields) have changed.
  • - destroy: Resource exists in state but has been deleted from code.
  • -/+ replace: Resource is tainted or identity has fundamentally changed; will be destroyed and recreated.
Ventana de terminal
$ testform plan
Testform used the selected Provider to generate the following execution plan.
Resource actions are indicated with the following symbols:
+ create
~ update in-place
- destroy
Testform will perform the following actions:
# github.testcase.login.case.feature.@tc-1 will be updated in-place
~ resource "github_testcase" "login.case.feature.@tc-1" {
id = 104
~ labels = ["login", "smoke"] -> ["login", "smoke", "high"]
~ milestone = "Sprint 41" -> "Sprint 42"
}
# github.testcase.checkout.case.feature.@tc-3 will be created
+ resource "github_testcase" "checkout.case.feature.@tc-3" {
+ title = "Apply valid promotional coupon"
+ labels = ["checkout", "promotions"]
+ state = "open"
}
Plan: 1 to add, 1 to change, 0 to destroy.

In automated pipelines, always save the plan with -out and pass it to apply to avoid race conditions:

Ventana de terminal
# In PR stage:
testform plan -out=testform.plan.bin
# In Merge stage:
testform apply testform.plan.bin

When running with -detailed-exitcode:

  • 0: Succeeded with empty diff (no changes).
  • 1: Error occurred.
  • 2: Succeeded with non-empty diff (changes are present).