Regression Testing in Popular Methodologies

Regression Testing in Popular Methodologies

Regression Testing in Popular Methodologies: Companies introduce changes from time to time to improve their products. These changes affect the way a product or application works. They may include things like code changes, architectural adjustments, introducing new features, modifying the existing ones, restructuring of data and so on. Whatever the change, the product is expected to work as required. Overall, there should be minimal complaints, zero-P1 issues (Priority 1, i.e., higher priority bugs), zero-fault tolerance policy (minimum number of bugs), and most importantly, should at all times work seamlessly and not break!

A software product is bound to fail if it remains the same over time. Product upgrades in terms of releasing a new version of the same product featuring major enhancement, better performance will keep the pass-fail ratio in check! In other words, enhancements are cumulative of multiple rounds of code changes, code merges, the addition of new features, disabling lesser used features, feedback implementation and so on. To validate all of these which are important to pass a product, we need Testing.

In cases where changes are frequent, testing often and continuously becomes important. However, testing everyday and every time is not a feasible option. An organization will be losing time, money and resources in this process, which is not an ideal thing to do. To tackle this scenario, we need rules/strategies that will make this process more focussed and streamlined; and in an agile environment, this is easy!

Agile development methodology supports project tracking and management processes through the scrum, kanban, Jira, sprint planning etc. Agile frameworks are thus designed to support projects that come with stringent deadlines, parallelly supporting frequent changes. These changes/modifications may be anything from the kinds of changes mentioned above and would need functional tests to validate their correctness. Additionally,  a final test that checks the overall health of the product or application will be required. Regression Testing leverages this. Regression Testing is a process of re-running functional and non-functional tests to ensure that previously developed and tested software still works as expected, after any change. In other words, the test checks for the overall working of the product ensuring stability and sustainability by calling out errors that may otherwise impact its working.

In all methodologies practised today, Regression Testing includes –

1)    Re-execution of all functional (and non-functional) test cases present in a regression test suite through automation.

2)    Making sure that all complex, error-prone features and other important test cases are included and modified as needed in a regression test suite (a typical process of re-visiting a regression test suit).

3)    All instances of functional test cases are prioritized and taken care of (executed) within a regression test suite.

Benefits of Regression Testing –

–       A chance to catch something major at an early phase of development:

It’s often a known fact that most bugs that occur frequently do not just need a patch fix but need a fix at the source. Finding the source of complex bugs can be difficult at a later stage and may not be that easy to fix. Regression test allows you to catch any such bugs early.

–       Keeps in check the overall health of the product or application:

Regression testing is often done at the last step on a modified branch of code before merging it into the main branch. And at this point, end-to-end testing is called for to make sure that there are no side effects of this new code merge. Regression testing allows you to do this. It gives you a summary of how the old/historic code reacts with the new code change in place.

Reasons for Regression Testing –

This is largely dependent on the reason why the test has to be conducted in the first place. Based on this fact, we have identified three sources.

–       Fixing an old bug – sometimes a small bug is patched as a fix instead of finding the source that is causing it. This temporary fix may pass a re-test per se. But at a later point in time, the patchwork may not work anymore re-surfacing the old bug. This anomaly is caught in regression testing. Code fixes, therefore, should ensure that a bug, once found and fixed will not re-emerge.

–       Fixing a new bug – when a new bug is fixed by revisiting a code, it has to be re-tested for validations. Post the code merge, a regression test will validate if the new bug fix was successful or not.

–       Checking for side effects – double-checking that the recent bug fixes have not caused any change in the old functionality.

Basics in an RT strategy –

Nature of the product –

Nature of the product is important to understand and choose a relevant RT strategy and test plan. For example, an approach to test a simple website’s landing page and that of a professional portal may differ significantly. The first one, may just check for UI test cases, the second, however, will require a comprehensive set of test cases covering security aspects, performance and so on.

The Scale of the Product –

is as important before any budget is allocated for RT. Manually testing these may serve the cause. Whereas, a larger application that serves an enterprise may require complete and thorough testing. In such cases, regression testing automation remains the prefered choice.

Regression testing in popular methodologies

Waterfall Methodology

This is a popular method in product development. In this, as already known, testing is conducted only after the product is fully developed. In testing in waterfall methodology can be broken down  into three stages:

  • QA and testing teams run tests covering all test cases in the product. When testing is complete, the team hands bug reports to the development teams who then fix these bugs.
  • Once these bugs are fixed, the application is tested for stabilization. Bugs often introduce new bugs, some critical and some not. Evaluating the severity of the bugs takes time. Once the severities are pointed out, the development team would proceed with another round of bug-fixing. There also has to be a re-test on this to validate the fix. This cycle thus delays the stabilization process.
  •  When the stabilization factor is taken care of and a retest confirms no other bugs, the testing team runs a full regression test to check the overall health of the AUT (Application Under Test) and makes final amendments to the product.

Therefore, in waterfall methodologies, stabilization and full-regression testing are not just critical but also are time-consuming processes.

Agile Methodology

Agile development methodology makes use of partial or iterative regression testing and also full regression testing.

Partial regression testing checks the features impacted due to new developments during iterations to check for major code failures also tapping on adjacent areas of the code module.

Full regression testing covers re-running functional and non-functional tests to ensure that previously developed and tested software still performs after a change. It is to make sure that there are no surprise bugs before major releases and deployments.

Maintaining a regression test suite is important to restore its efficiency. This calls for testing teams to add new relevant functional test or test cases and also delete old and obsolete ones. This approach reduces time and resources spent on rigorous testing by not compromising on the product quality.

Regardless of the methodology, there are certain tips on optimizing these approaches.

Kanban

This method uses a dashboard that allows for tracking progress and improvements by visually representing work. Team members can estimate their workloads before promising any deadlines.

In the Waterfall method, Kanban clearly estimates time for the stabilization process to plan testing efforts more carefully. In the Agile method, Kanban helps pick priority test cases for iterative regression and easily identify critical points that are to be included in full regression.

DevOps

DevOps is a process carried out by CI – continuous integration, CD – continuous delivery, and continuous deployment. This process, needless to say, thrives on automation. In an Agile environment, CI refers to automated continuous integration.

Regression testing is often automated to execute after continuous integration. The results of this in DevOps is quick delivery of the product. Therefore this process catalyses product releases.

To Conclude –

RT is a process and consumes dedicated resources and time like any other process would have. When the deadlines for development and deployment are closely knit, RT is sometimes skipped. These aspects are sometimes dependent on the needs of the stakeholders who understand the product scale and type. At an ending note, the best regression testing strategy reduces testing time, testing effort without any compromises on product quality and customer needs.