Skip to content

Meta-Argument depends_on

The depends_on meta-argument allows you to define explicit execution dependencies between test resources to guarantee proper ordering and prevent race conditions.


Define dependencies directly in your feature files using either canonical array brackets (matching Terraform lists) or comma-separated parameters:

@tc-checkout
@depends_on(["auth/login.case.feature.tc-1", "inventory/catalog.case.feature.tc-4"])
Scenario: Finalize checkout order
When the user submits checkout
Then order is created
  • Array notation (Terraform Parity): @depends_on(["target1", "target2"])
  • Comma-separated arguments: @depends_on("target1", "target2") or @depends_on("target1")
  • Multiple tags: @depends_on("target1") @depends_on("target2")

dependencies:
"checkout/checkout.case.feature.@tc-6":
depends_on:
- "auth/login.case.feature.@tc-1"
- "inventory/catalog.case.feature.@tc-4"

  • Topological Sorting (Kahn’s Algorithm): Prerequisites are applied and created first during testform apply.
  • Circular Cycle Detection: testform validate inspects the DAG and reports any circular dependency cycles before execution.
  • Graph Visualization: testform graph displays dependency links with └── 🔗 depends_on: ....