Take the 2-minute tour ×
Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. It's 100% free, no registration required.

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  
\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.

share|improve this question
add comment

2 Answers

up vote 0 down vote accepted

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.

share|improve this answer
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. –  chawarong Mar 25 '12 at 2:53
add comment

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.

share|improve this answer
    
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? –  chawarong Mar 27 '12 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 mrstevegross@gmail.com. –  Stephen Gross Mar 28 '12 at 16:19
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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