That depends how you configure your steps factory ...
Sanity dictates that you ensure that the steps instances are unique
(e.g. using the singleton mode of the dependency injection containers).
Assuming this is true, then yes, the steps will always be executed from
the same methods in the same class.
Are you experiencing anything that may contradict this behaviour?
On 07/09/2014 14:46, Anders wrote:
Message Title
Is it guaranteed that steps implemented in the same class will reuse
the same step class instances when executed within the same scenario?
Example:
Scenario: My scenario
Given step 1
When step 2
Then step 3
And step 4
Let’s say that step 1 and 2 are implemented in class A, and step 3 and
4 are implemented in class B.
When this scenario is run, is it guaranteed that step 1 and 2 will be
executed in the same instance of class A, and step 3 and 4 will be
executed in the same instance of class B?