Reusable Test Suite – Why & How?

What are the top 5 buzz words that come to one’s mind when one thinks of customer expectations from the point of view of providing testing services? Obviously Cost, Quality, Defect Leakage, Automation and quite a few more. To me, ‘Reusability’ is definitely one amongst them. Unfortunately it is one of those loosely used terms without being measured seriously.

If you are a tester, and even otherwise, it is easy to figure out that reusability has a direct relation and an inverse proportion to the Test Effort. We need to understand the need of reusability before implementing it. Though I will discuss, further down in this blog, specifics about reusability in testing projects, let’s first consider various aspects or needs of reusability.

Why Reuse?
Reusability is defined, in Wikipedia as ‘To use an item more than once’. This definitely means efficient use of existing knowledge, product or service being reused and minimize effort thereby leading to cost saving and maximize productivity and reliability since the item has already been used once.
Reuse can be thought of as opportunistic or planned. The former means that while getting ready for a project, the team realizes that there are existing components that they can reuse, while the latter emphasizes on strategically designing components so that they’ll be reusable in future projects.
Testing projects encompass both of the above mentioned approaches. I feel a mix of both works best, especially for the services industry.

Key features to consider?
If a company decides on building a reusable test suite for all the existing and future testing projects, following are the key features to be kept in mind, while choosing the mechanism to store the reusable test scripts,

  • Minimize manual effort
  • Ease of use
  • Time to search, retrieve and reuse the data
  • Maintenance effort of the application
  • Standardization to ensure maximum reuse with minimum effort
  • Secure and customized accesses
  • Usefulness to business in terms of reports and dashboards

What mechanism/tool to use to create a reusable testing repository?
Following are the options one can consider while choosing the mechanism to store the reusable test scripts,

  • Store the reusable scripts in excel based document(s). While this is an easy way of storing and retrieving data for simple searches, it provides limited security features, is manual in nature in terms of reusing the data
  • Store the reusable scripts in the standard test management tool that you use. The advantage of this approach is the ability to directly execute the test scripts thus saving time. The scripts can also be exported to excel when required. The disadvantages are limited means of customization and automation, slower response time of application, limited access to such application
  • Build an application with a database and GUI to store test scripts. This option provides maximum possibilities of customization in terms of searches, automation, user friendliness, and extensibility. But this would mean maintenance of the application and user training for the initial setup

How to create a reusable testing repository?
Whatever be the mechanism or tool used, the starting point of building any online reusable test suite is to identify the exhaustive list of functionalities and modularize them. This would help in categorizing the test scripts and in turn help in searching and reusing them. The standardization of naming conventions for each of the identified functionalities are very important in order to enable test scripts from different projects to reside in the same repository under different categories.
For existing projects, a one-time effort is needed to identify the reusable conditions and map them to the functions and sub-functions and finally repositorize them.
For new test project engagements, at the initiation phase, one should identify the scope of the project in terms of the functionalities to be tested (from the exhaustive list that exists as baseline) and then analyze the reusability of test scripts from available suite based on the functions identified.

What should a reusable testing repository enable/ensure?
Searchable: One should be able to easily search the available test scripts by performing a customised search based on various applicable parameters and then download the same in a usable format.
Security: One should also ensure that not everyone in the project should have the right to change the existing data in the suite, while the suite should be flexible to allow changes to be made when required by authorised people.
Revisiting the exhaustive list of functionalities: At the closure of each project, one needs to analyse if there were any newly built project specific test scripts or if a new functionality was tested (which did not exist in the baseline list) and add them to the reusable suite in generic or business specific category.
From a customer perspective, dashboards can be created to help them identify the existing coverage of functionalities and count of reusable test scripts at any given point of time. It provides a real time data to help in future ventures, estimations and helps gain confidence in the effectiveness of the reusability.
For a testing team, , the reusable repository helps in  depicting their existing experience in terms of test coverage and measure and pass on the benefits to the customer project after project.
Thus, building an online test suite repository is an iterative approach and makes a significant difference in testing effort thereby providing benefits both to the customer and the testing team.