Skip to content

testform workspace

Ventana de terminal
testform workspace <subcommand> [options] [args]

The testform workspace command manages separate working states (workspaces) within the same configuration directory.

Workspaces allow you to manage multiple distinct environments (such as staging, production, qa-env-1, or release-2.0) using the exact same .feature test files, with completely isolated state files and remote issues.

Lists all existing workspaces. An asterisk * indicates the active workspace:

Ventana de terminal
$ testform workspace list
default
* staging
production

Creates a new, empty workspace and selects it:

Ventana de terminal
$ testform workspace new release-2.0
Created and switched to workspace "release-2.0"!
You're now on a new, empty workspace. Workspaces isolate their state,
so if you run "testform plan", Testform will not see any existing "default" resources.

Switches to an existing workspace:

Ventana de terminal
$ testform workspace select production
Switched to workspace "production".

Displays the name of the currently active workspace:

Ventana de terminal
$ testform workspace show
production

Deletes a workspace. The workspace must be completely empty (all resources destroyed) before it can be deleted:

Ventana de terminal
testform workspace delete old-sprint-38

When using a remote backend (such as S3), Testform stores workspace states under isolated prefixes:

  • default workspace: my-bucket/testform.state
  • staging workspace: my-bucket/env:/staging/testform.state
  • production workspace: my-bucket/env:/production/testform.state
  • 0: Workspace command succeeded.
  • 1: Workspace already exists, does not exist, or could not be deleted.