My team uses Selenium 2.0/webdriver to test our enterprise web app. We've been learning and playing with webdriver commands for a while. Each team member has their own style to keep their script files. Now we are trying to settle the file/folder structure that suitable for everyone. We want to keep our structure clean and scale for our automation. Currently the file/folder structure looks like this:

\bin << for script runner, shell scripts, automation utility etc. 
\lib << for common/organizational APIs e.g. login/logout api 
\projects\projA << this is where our Selenium scripts reside 
\projects\projA\config << some config/parameters, GUI mapping, testbed files 
\projects\projA\lib << project specific library 
\projects\projA\data << test data ...

So, I am not sure what's missing and if this is good enough. I am also interested in knowing how other people do this, too. Please share/comment.


2 Answers 2


There is nothing inherently clean or good about a directory structure. Rather, the virtue of a directory structure is in relationship to your needs.

You have a directory structure now. Have you or any of your teammates noticed any problems with it? If not, it is a good directory structure for now. Later, circumstances may change, and the directory structure may no longer meet your needs. You can try to anticipate future circumstances now, but most of us are not as good at predicting the future as we think. Alternatively, you can be open-minded about changing the filesystem when changes are justified.

  • 1
    I've been using the structure for a while now, it now look a lot different than the one I started. @user246, I agree with you that circumstances and needs are definitely changed over time. I'd suggest everyone who starts thinking about folder structures to think big and start small. Imagine what folder structures you ultimately want and don't start everything all at once, only the key folders are necessary at this stage. It will evolve over time. Commented Mar 25, 2012 at 2:53

Well, I don't know your AUT that well. I have designed two automation frameworks (one using Selenium, one using Squish) and both followed the same general 3-layered architecture:

Bottom layer: "Support" API for using the underlying mechanism (Selenium/Squish/etc.) Domain-specific layer: For using the AUT Test layer: Actual tests to drive the AUT

I've found that this approach nicely separates out the concerns in an efficient manner. I can get into more detail if you're interested.

  • Hi Stephen, I am very interested in your 3-layered architecture as I am still designing the selenium/webdriver framework. How are you going to share the idea? Commented Mar 27, 2012 at 15:38
  • @ChawarongSongserm I'm considering developing my solution as an open-source project. I've implemented the system twice now, and I think the next incarnation will be suitable for broad use. Did you want to help out? If so, email me at [email protected]. Commented Mar 28, 2012 at 16:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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