Dependency Injection with serenity-cucumber spring

690 Views Asked by At

I am writing auto-test for web app using cucumber, serenity and spring in Java. I have 3 separated files with step definitions classes. One test includes steps from different step definition classes and I need to use only one exemplar for WebDriver and some of my own helpers for all step definition classes. How can I do it?

P.S. Tried to create TestData.class, which contains all needed data and use @Autowired annotation to create TestData object, but as result I received three exemplar of TestData and three different browser

0

There are 0 best solutions below