0

What project structure is good to store e2e and integrations tests? It's need to add hierarchy between e2e and integration tests. Where and how it's better to store integration tests?

Currently I have only few e2e tests:

Project structure

  • Welcome. Have a look here about asking. As it stands you are likely to get downvotes as it is unclear what you are asking, e.g. what problem are you trying to solve? – Ray Oei Dec 13 '18 at 14:52
  • I have added details – Artur Dec 13 '18 at 16:30
2

Well, I am a big fan of creating workflows for your test automation. Whenever I have done that, I usually get a lot of return on that investment. What I mean by that is essentially creating an abstraction of nearly anything your test might do. So, instead of a test running all the actions (and them living and dying within the bounds of your test method), you create a reusable method that can be called, parameterized and modified when needed.

Why this is relevant: I see you are creating page classes, so you have the obvious abstraction. Now, the workflows can manage the relationship with those page classes. So, if you are managing to click a button in your workflow that is supposed to get your to a final page, then have your method return an instance of that page class (for final page).

So, whether or not your tests are simply integration or e2e (whatever that means in your world), then create the workflows. That's my advice, it will pay off. Trust me.

Then, separate your test classes by duty. And of course, try to embed your workflows within themselves, so that your e2e test may have a chance to use your integration tests workflows, and you end up having some workflows that call so many others, that they turn into e2e.

Make sense? I usually have lots of visuals and some time to explain this in a training, but I can't really share any materials that I have developed at my company. :)

| improve this answer | |

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.