Test Automation: The Promise Versus The Reality

[article]
Member Submitted

longest time to maintain. If you compare test automation to any other application you will realize that only a small percentage of time is spent implementing it as opposed to maintaining it. Do you want the majority of blood, sweat and tears to occur during the relatively small duration of implementation, or during the many years the automation baseline is in use, providing you don't scrap it first because of the maintenance difficulty.

Additionally, number four (4) may make sense on the surface, but is also deceiving. Why shouldn't a manager task testers with implementing a testing tool? We’ll address this question shortly, but first, let's take a look at all the possible approaches/frameworks one could use to implement test automation. We'll include the pros and cons of each, including Record & Playback. Of course, there are hybrids and variations of the five approaches below, but we'll just deal with the main ones.

Record & Playback –An automation tool generates scripts by recording user actions. The generated scripts can be played back to reproduce the exact user actions.

Pro:

  • Quick setup time
  • Easy to learn

Con:

  • Difficult to maintain
  • Does not accommodate multiple datasets
  • Does not accommodate dynamic data

Data-Driven–An automation tool generates scripts by recording user actions. The "hard-coded" data is removed from the scripts and placed in external repositories. The generated scripts can be played back using multiple datasets from the data repositories. This approach requires some understanding of programming concepts such as parameterization and looping.

Pro:

  • Quick setup time
  • Can use multiple datasets with one script
  • Provides separation between the data and scripts

Con:

  • Multiple scripts to maintain
  • Does not accommodate logic branching

Modular–Groups of functionality or screens are turned into scripts. By combining modules or scripts, the user can form automated test cases. There is limited amount of recording in this approach. Also, this approach requires an intermediate understanding of programming concepts.

Pro:

  • Provides separation between the data and scripts
  • Delivers script reusability
  • Provides one maintenance point for each functionality or screen

Con:

  • Longer implementation time
  • Implementation team must have programming background

Keyword–Automated test cases are created based on "Keywords." The keywords drive the navigation, data and validation. The scripts get generated during the execution of automated test cases.

Pro:

  • Separation between script, data, and application under test
  • Keywords can be portable to application
  • Easy to maintain
  • Non technical personnel can setup automated test cases after implementation

Con:

  • Requires extensive programming background to implement
  • Longer implementation time
  • Detailed knowledge of automation tools and concepts a must

Database–Automated test cases are created based on database entries. The application's objects, navigation, and data are stored in a database. The automated test case queries the database to drive the automated test.

Pro:

  • Easiest to maintain
  • Can perform mass changes with query, one location to manage objects, navigation, and data

Con:

  • RRequires extensive programming background to implement
  • Longer implementation time
  • Require knowledge of database concepts
  • Detailed knowledge of automation tools and concepts a must

Obviously, many of these approaches require skilled developers to help implement and that leads us back to the question of, "Why shouldn't a manager task testers with implementing a testing tool?" Just as a business user can use an application, but not necessarily have the technical skill to customize it and write complex scripts to improve its usefulness, a tester with no development background may not be the best choice to implement several of the frameworks above.

To ensure success, test automation must be approached as a rigorous project that requires analysis, strategy formation, planning, framework development and manual to automated test

About the author

TechWell Contributor's picture TechWell Contributor

The opinions and positions expressed within these guest posts are those of the author alone and do not represent those of the TechWell Community Sites. Guest authors represent that they have the right to distribute this content and that such content is not violating the legal rights of others. If you would like to contribute content to a TechWell Community Site, email editors@techwell.com.

AgileConnection is one of the growing communities of the TechWell network.

Featuring fresh, insightful stories, TechWell.com is the place to go for what is happening in software development and delivery.  Join the conversation now!

Upcoming Events

Nov 09
Nov 09
Apr 13
May 03