0

http://www.specflow.org/documentation/Context-Injection/

[Binding]
public class MyStepDefs
{
  private readonly PersonData personData;
  public MyStepDefs(PersonData personData) // use it as ctor parameter
  { 
    this.personData = personData;
  }

  [Given] 
  public void The_person_FIRSTNAME_LASTNAME(string firstName, string lastName) 
  {

  }
}

here is PersonData thread safe?

  • Binding Classes (MyStepDefs above) are created for each scenarios or for each features... if it is per features, then what if we are executing tests in parallel and two different scenario out lines are taken by different threads? – Varun Nayak Mar 02 '16 at 12:47

1 Answers1

1

Yes I believe it is thread safe.

Sam Holder
  • 32,535
  • 13
  • 101
  • 181