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.
Asked
Active
Viewed 597 times
1 Answers
0
You have multiple options:
Create a specialized class with static methods to handle different data
Use Behat functionality to communicate between contexts, see similar question accessing contexts from each other
If you need to generate different data use Faker for php
-
Thank you for your response, I used 2 and everything works. – asd11_81 Nov 06 '16 at 15:37