Home > Articles > Programming

What Is Just Enough Test Automation?

You most probably have experienced the operational, political, and cultural pitfalls of test automation. What you need are some practical tips, tricks, and suggestions. Read more to find out how much test automation is enough.
This chapter is from the book

This is not going to be a discourse on how to select and implement an automated testing tools suite. There are a number of articles and books available today that offer practical advice on tool selection. It is also not an introductory book on software testing automation. If you are reading this book, we'll assume you have some level of previous experience with test automation. We will also assume that you have some serious questions about the practical aspects of test automation. You may, or may not, have a successful implementation under your belt. In any case, you most probably have experienced the operational, political, and cultural pitfalls of test automation. What you need is a how-to book that has some practical tips, tricks, and suggestions, along with a proven approach. If this is what you want, read on. Our perspective on test automation is what you will be getting in the remaining chapters of this book.

No New Models, Please!

"Read My Lips: No New Models!" echoes a sentiment with which we whole-heartily agree (14). As mentioned in the Preface, there has been a plethora of models of the software testing process (6,10,11) and models of the automated software testing process (4,7,8,9,12,15), including a software test automation life cycle model (2). While these ideas are all right and in some aspects useful when discussing software testing and test automation, they are of little use to real-world practitioners.

The Software Engineering Institute at Carnegie Mellon University has established a Software Testing Management Key Process Area (KPA ) that is necessary to achieve Level 2: Repeatable in the Software Process Capability Maturity Model (CMM) (11). Such a model is useful for general guidance, but it does not define a process that is useful to the test engineer proper. It does give test managers a warm and fuzzy feeling when they pay lip service to it but in reality the testing process activities do not reflect the model at all. The same things hold true for the software test automation life cycle model. We do not believe in life cycles. Instead, we believe in processes that direct workflows. Every testing group has a process. In some instances it is a chaotic process, and in other instances it is more organized.

Krause developed a four-level maturity model for automated software testing (3) that he ties to the software testing maturity model (1) and the SEI Software Process Maturity Model (4) that evolved into the CMM. The levels he specified are Accidental Automation, Beginning Automation, Intentional Automation, and Advanced Automation. While this model may describe what happens from a conceptual standpoint, it offers no practical advice that will facilitate test automation implementation. It merely describes what the author has noted happening in typical organizations.

Dustin, Rashka, and Paul published an Automated Test Lifecycle Methodology (ATLM)—a "structured methodology which is geared toward ensuring successful implementation of automated testing."(2) It identifies a four-phased methodology: Decision to Automate Test; Introduction of Automated Testing; Test Planning, Design, and Development; Execution and Management of Automated Test.

While this model is useful from a management and control perspective, it is not practical from the test automation engineer's point of view. Powers offers practical advice that can be very helpful for software testing engineers who are responsible for building and implementing a test automation framework. It includes common-sense discussions of programming style, naming standards, and other conventions that should be applied when writing automated test scripts (9).

There is a comprehensive discussion of the principle of data abstraction, which is the basis of the data-driven approach to automated software testing. He discusses alternatives for coding how data are defined and used by the test script. According to Powers, "The principle is one of depending less on the literal value of a variable or constant, and more on its meaning, or role, or usage in the test." He speaks of "constraint for product data." He defines this concept as "...the simplest form of this data abstraction is to use named program constants instead of literal values." He also speaks of "variables for product data" and says, "...instead of the literal name 'John Q. Private,' the principle of data abstraction calls for the programmer to use a program variable such as sFullName here, with the value set once in the program. This one occurrence of the literal means there's only one place to edit in order to change it."(9)

The immediate impact of the statement Powers makes is that you begin to see the possible benefits derived from data abstraction when it comes to the maintenance of automated test scripts. He further suggests that these values be stored in a repository that will be accessible from the test script code: "All that's required is a repository from which to fetch the values, and a program mechanism to do the retrieval."(9)

This is the underlying principle of Strang's Data Driven Automated Testing approach. His approach uses a scripting framework to read the values from the test data repository. It uses a data file that contains both the input and its expected behavior. His method has taken data abstraction from storing just the literal values to also storing the expected result values. This approach can accommodate both manual and automated data generation. The test script must be coded in such a way that it can determine right results from the wrong results (12).

Powers's and Strang's work is reflected in the data-driven approaches discussed in Chapters 7 and 8 of this book. Archer Group's Control Synchronized Data Driven Testing (CSDDT) is an example of one such approach that employs the concepts discussed here.

Rational Software Corporation has authored the Rational Unified Process (RUP), which contains specific test phases that are designed to support its automated testing tool suite (10). Even if you are not a Rational user, the testing process information provides a solid base for doing even manual testing. RUP itself comprises process documentation that addresses all of software development, not just testing. It is relatively inexpensive—the RUP CD-ROM sells for under $1,000. The most important aspect of RUP's testing approach is that it can be used to support a data-driven automated testing framework. That is why we have used it in the past and why it is mentioned in this book.

A Life Cycle Is Not a Process

The problem with the approaches taken by the authors cited thus far and other industry gurus is the same problem we have with all life-cycle models—they are management oriented, not practitioner oriented. Again, this approach offers very little in the way of an operational process that we can term an automated testing process. Other approaches, e.g., data-driven automated testing, which these authors have criticized, offer much more in the way of methods and techniques that can actually be applied in day-today test automation activities. What this line of thinking really offers is a model to give testing managers the same warm and fuzzy feeling mentioned above with respect to the testing maturity model.

Although purported to be an experiential model, this representation of automated testing has not been developed on a deductive basis. It is a theory based on inductive reasoning, much of which is founded on anecdotal evidence, as are many of the models advocated in information systems (IS) literature. On the other hand, nonmanagement techniques, which are operational, not managerial, and which are applied to specific tasks in the automation process, are based on deductive reasoning. Data-driven testing is an example of a nonmanagement technique. These techniques have evolved through practitioner trial and error—how many of the traditional engineering methods have come to be that are used today.

A Tool Is Not a Process

The most recent results for the minisurvey on the CSST Technologies, Inc., Web site indicate that 40% (102 out of 258 respondents) see software testing methods/process implementation as doing the most to facilitate their testing work. Twenty-four percent (63 respondents) see improved software requirements documentation as the most important facilitation factor. Nineteen percent (50 respondents) believe that software test standards implementation is the most important aspect. Ten percent (25 respondents) cite improved test planning as the most important consideration. Only 7% (18 respondents) think that more time to test would facilitate their work.

Purchasing a software testing tool suite does not constitute implementing a software testing process. Processes are steps that are followed that result in a goal being achieved or a product being produced. The process steps implement testing activities that result in test execution and the creation of test artifacts. Automated software tools support existing processes and, when the process is chaotic, impose some much-needed structure on the activities. One of the primary reasons software testing tool implementations fail is because there is little or no testing process in place before the tools are purchased.

When we are designing and building automated tests, we do not even see a process. What we see are tasks, a schedule, and personal assignments to complete. For us, just enough software test automation is the amount we need to do our jobs effectively. If we do not have commercial software testing tools we can use, we build our own or use desktop tools that our clients routinely load on workstations.

Figure 1.1 illustrates a testing process that was defined for one of our clients that is loosely based on the RUP testing approach (10). Our process approach differs from Rational's in that we view test script design as part of test implementation whereas in RUP it is still considered to be a test design activity. The reason we differ is we believe that the skill set required for test design does not include previous programming experience, but the one for test implementation does.

Figure1.1FIGURE 1.1 Quality Assurance and Testing (QA&T) Process

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020