-1

As the title says I'm trying to implement my tests with BDD but I'm unsure how to structure it correctly. I have a separate folder where I keep my steps. I kinda want it to be one large file because then it seems easy to reuse steps that are the same in different tests. For example, returning to the home screen or waiting for the app to be ready. These kinds of steps should only be defined once.

Or should I try to keep one file with common steps that are shared among several tests and the other step files be test specific? This seems like more work though.

0

One option is to have the steps divided between multiple step definition files that are grouped by pages.

That's if you are using the Page Object Model. But even if you are not using it, there is no requirement for the steps from different tests to be in different files, they are naturally test-independent, but logically part of a single page.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.