I'm currently trying to implement a base for my automated tests based on the page object pattern with Python, Selenium and Behave.

I've never really worked in a reasonably big QA project, especially with Python, and I was thinking that someone might have some insight into how I would go about structuring my files and folders.

Are there any certain Pythonic conventions when it comes to naming the folders and where to put everything?


You say you have little design experience: while it is possible to start alone, you are likely to make many mistakes without being aware of them. Working as newbie without a guidance of someone senior is sub-optimal for your professional growth, but possible. So don't worry and do your best. You can always change it when you learn better way to do it. Making mistakes is normal part of the process of learning.

Many programmers are self-taught, but being an apprentice under experienced master allows you to learn the skills faster. Trick is, how to tell who is experienced guru, and who is only a pretender - because you don't have the skills to tell them apart yet. This is normal.

You are trying to learn and use best practices, this is good. Problem is that lot of advice will go just over your head because you would not know how to apply it in you special case. This is normal.

Don't worry too much, you will redesign your system few times as you learn about consequences of your design decisions. This is normal.

Try to find any local experts who will be willing to give you advice. Very strongly consider joining relevant open-source project where you can read the code and discuss with experts the "why" of the decisions.

Subscribe to https://softwareengineering.stackexchange.com/ and read obsessively. So will find gems like Are bad programming practices typical within the software industry? Hint: Answer is Yes!

So learn as much as you can, google "how to ask question the smart way" - google will be your good friend.

Good luck!


There is no right way to structure your project. Of coarse there are common aproaches to that and you can figure them out by browsing related open source projects. Structure can also be dictated by the test framework.

I would suggest the following:

  • pick a test framework. I suggest py.test
  • also consider using a more high-level selenium framework like splinter or selene
  • alternatively you might start building your own selenuim wrapper, but that's not the best idea if you are beginner
  • try to find open source projects that use your stack and pick some ideas from them

Look into this list for tools and frameworks: https://github.com/atinfo/awesome-test-automation/blob/master/python-test-automation.md

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.