Dear Record & Playback,
I know that it’s been a while since we’ve spoken, but I’ve been thinking
about you lately. It’s time I get some things off my chest. Remember when I was
just a kid in the world of test automation? Seems like it was just yesterday. I
was walking past some cubes in an office building when I saw you testing an
application all by yourself, with no one else in sight. I thought I’d seen a
ghost and had to do a double take to make sure it was actually happening.
You were the coolest thing in the world to me. Immediately you took me under
your wing and showed me so many new and wonderful things about automation
scripting. With you, I quickly learned the automated test tool language. We were
inseparable.
That was years ago, though, and everything’s different now. Thinking back on
those good times makes me a little remorseful about the way things turned out.
For years I blamed you, but as time progresses I see that perhaps I was too hard
on you. My desire is for us to move forward into a more positive relationship,
but first we must step back and see where we went wrong.
Where We Separated …
For me, your dishonesty was at the heart of the rift. When we first met, you
made a lot of grandiose promises about what you were capable of, and I believed
you. You promised effortless automation by simply recording the execution of
manual test steps in the application. You promised seamless overnight runs by
playing back that recorded script. You promised that automated test analysis
only required a brief inspection of an easy-to-read report. You even promised to
reduce automated test maintenance to the click of a button. I foolishly believed
you when you said that click would correct the script with an update run or by
simply re-recording a small portion of a test script.
Slowly, however, the veil began to lift from my eyes as I watched recorded
tests fail miserably when played back--minutes after being created. I saw poor
coding standards and redundancy grossly expand analysis and maintenance to epic
proportions. I watched automation efforts fail throughout the industry due to
people underestimating the total cost and overestimating the return on
investment.
At first I thought it was all due to misunderstandings, but then I saw how
you pushed the damaging untruths about test automation. You aligned with and
allowed yourself to be used by many dishonest tool vendors. At that point, I no
longer wanted to associate myself with you. I went on a crusade to alert others
that relying on you would be detrimental to an automation effort that seeks to
create a robust, maintainable suite of automated tests.
I never fully abandoned you, but our relationship was forever altered.
Moving Forward …
Part of me still feels justified for taking a strong stance against you. It
was necessary to counter the false claims about your capabilities! However, I do
think there’s a way we can mend our broken relationship.
Instead of allowing you to be continuously misused by those motivated to
achieve their sales quotas, I want to help lead you back onto the path of
righteousness. I can help you and others understand the good you bring to our
world when used properly within an effective automated testing process--even to
test automation efforts that value maintainability. But you’d have to try and
fit within the following process:
- Learn the application and the object dynamics
- Address the desired quality attributes
- Create a directory structure
- Create initialization and configuration parameters
- Create reusable procedures
- Develop tests with reusable procedures
The first two steps are part of the automation pre-planning. It is important
to understand the environment, application functionality, and the application’s
unseen dynamics. These things impact how tests are developed and executed. Then
determine how best to handle the desired quality attributes (i.e., scalability,
usability, reusability, flexibility, and robustness) prior to structuring the
automation framework.
The third step involves identifying and creating the physical structure that
stores and manages the automation components (i.e., folders, scripts, data
files, and libraries). Afterward, you’ll create the initialization and
configuration parameters that set up and stabilize the tool and the environment
during test execution. Then you’ll create automated procedures (a.k.a.
functions) that increase modularity and maintainability, which will be used by
several automated tests. Finally, combining the reusable procedures from the
previous step to create automated tests marks completion.
Much of the automation work takes place in the first and fifth steps, and it
is here that your capabilities are most useful. By doing some simple recordings
in the application, test automators can review the properties that are used to
uniquely identify each object that is automatically captured in the object
repository. Then, by playing back those recordings under various conditions,
much may be ascertained about the various dynamics associated with those
objects.
An automator may find out that certain properties require the use of regular
expressions, or that different properties need to be used. Based on how objects
are recognized, the automation approach may need to be altered in order to
establish proper verification points. By quickly understanding the object
dynamics, you can help us avoid many of the object-related problems encountered
during test automation.
During the fifth step, you can capture most of the basic actions that will
take place in the application. By automatically recording these actions into the
procedures as opposed to recording them directly into the automated tests, the
automator has a much greater ability to implement good coding standards, and
good exception handling and modularity. Then the automator can build robust
automated tests by combining the procedures to produce the desired test
sequence.
So, Record & Playback, I apologize for shunning you in the past. If I protect
you from being exploited, and make sure you’re used properly within a
well-defined automation process, we’ll have a good relationship. Now I will take
you under my wing, just as you took me under yours all those years ago.
Yours,
Dion