Comment
  1. Ashok says:

    June 26, 2009 at 8:37 am

    Hi John:We do about 8 releases in a year. Our initial objective was that regression testing cost will come down with automation. However, this has been offset (and made somewhat worse) with effort required to keep the automation scripts updated due to changes. Too frequent breakages. One option we are looking at is making our scripts more modular. Any other best practices or advice?

  2. John Scarborough, Vice President – Quality Engineering says:

    July 3, 2009 at 8:18 pm

    Hi Ashok. Without knowing more about your test automation, I can only respond in a general way.
    1. Modularization helps. You imply that your scripts are already organized by module, though, so you already know that it’s not just modularization that helps, but where you build your walls. Some walls have doors or even huge holes; so if you have only arbitrarily modularized, the tests for Module A may still be hammering Module B.
    2. Apply the wise practice, enforced by some unit test frameworks, of including set_up() and break_down() functions in each script so that you don’t inherit the garbage left by a previous script.
    3. Ideally one test case tests one requirement; and if a script contains more than one test case, failure of one of those test cases will not degrade or block execution of the other(s).
    4. Comment out (or disable in the automation driver) scripts that freqeuently fail due to code changes (and be sure these are added to manual testing). If you plan to use this test automation for several more releases, find out what is failing in those scripts that fail repeatedly, and work with the development team to see if debug asserts can be used to anticipate possible failures so that the automation driver blocks execution of those scripts but sets a flag that is logged.
    5. Work with the development team lead to write code that is testable. Here, that would mean that development is aware of test automation dependencies. With reasonable diligence the dev team should avoid compromising testability when fixing bugs or when revising features and fine-tuning performance.
    6. Avoid record-and-play as you would avoid drinking barn-yard runoff. Develop automation as you would write executable application code. Wrappers are wonderful.
    7. Use common function libraries so that you can make changes in one place, not in many places.

    Hope some of this is useful.

    Best -
    John

Leave a Comment
Your email address will not be published. Required fields are marked *
Name *
Email *
Comment*
 


Archives
Find us on
Facebook LinkedIn Twitter Youtube