title: Tips for creating a testing "framework" using Watir?
body: <p>I'm fairly new to writing test cases and this will be my first major project, but I'm kind of confused on how to design a framework (I know this is not the right word, but I'm not sure that word I'm looking for here).</p>
  
  <p>The application that I am testing involves creating a database of clients by filling out web forms and under each client are other forms that can be filled out and saved. The system is a bit more complicated than that as there are conditions that must be met before certain forms are filled, or certain answers cannot be chosen unless some preconditions are met.</p>
  
  <p>From my research, I've seen that a good way of going about this is by creating a module for every page, where a method is defined for each function on that page.</p>
  
  <p>So by that idea, for a page with lets say 40 text fields, would I create a method for each text field called "fill_<em>fieldname</em>"?</p>
  
  <p>I'm also concerned as to how I would go about atomizing the test cases when there are preconditions. For example if I need to test a specific form's functionality, I would first need a client to exist. Should I create a new client for every scenario that I'm testing, or just use one client for all the scenarios? I suppose that I'd have to do a precondition check before each test case to ensure that the client is still "usable" for testing...</p>
  
  <p>I'm really confused as to where to start, and I'd like to very much design a good framework from the get go, rather than have to scrap everything after the project has gotten too large. Any tips/advice would be very much appreciated.</p>