0

I need to share data between steps in different classes using BEHAT. Something like (Good practice to pass variables between cucumber-jvm steps) PicoContainer for cucumber. Is there such a framework? I know I can use static member but maybe is some framework for this.

Community
  • 1
  • 1
asd11_81
  • 23
  • 1
  • 4

1 Answers1

0

You have multiple options:

  1. Create a specialized class with static methods to handle different data

  2. Use Behat functionality to communicate between contexts, see similar question accessing contexts from each other

  3. If you need to generate different data use Faker for php

Community
  • 1
  • 1
lauda
  • 4,043
  • 2
  • 12
  • 27