A scenario that passes only after another scenario has run is not reliable. Test isolation means each scenario’s outcome stands on its own, whether it runs alone, in a different order, or alongside other scenarios. section 12.4.3
Isolation requires more than keeping step data separate: the whole execution context must be unaffected by previous scenarios. For parallel runs, that includes the state of external services and resources the behavior depends on. section 12.4.3
Isolation does not prevent steps within one scenario from sharing information. A transient scenario context can hold an order number for later steps, then disappear when that execution finishes; retries get their own context. section 13.1
Listing 13.2 Scenario that uses the scenario context for order number
*** Features/Ordering.feature ***
Scenario: The customer is notified about an order cancellation
Given the customer "Rebecca" is authenticated
And the customer "Rebecca" has placed the order #12342 #A
When the customer "Rebecca" cancels the placed order #B
Then the customer "Rebecca" should receive a notification about
➥ the cancellationThis order-cancellation scenario uses the placed order from an earlier step without repeating its number. The shared context is within the scenario, not between separate executions. section 13.1





