You not only can place all the steps in one class, you probably should.

I generally create one major steps class for a project, correspondingly, an epic (suite of related stories/features)

I might conceivably have a separate class for steps that are common across projects (which is rare) but I generally keep all my steps in one class.

When I first started out in automation, I kept one class for each story. I use that terminology because I mostly use JBehave and it’s the corresponding term for in .

This tended to make us have to re-word a lot of similar steps (like log-in) to avoid potential duplicate definitions, which is easier to avoid and easier to maintain when all the steps are combined into one class.



Source link https://sqa.stackexchange.com/questions/34625/cucumber-feature--and-step--

LEAVE A REPLY

Please enter your comment!
Please enter your name here