Test Driven Development and Regression Testing

How does Test Driven Development help with Regression Testing in Agile Scrum Projects? There is a time-hallowed definition of Software debugging:-.

“Debugging – The Fine Art Of Fixing One Software Bug And Replacing It With Another”.

Regression Testing is a kind of Testing that ensures that a software bug does not re-occur. After the Testing of a new Function, it is a good idea to run a Test that covers the previously written, Tested and clean Code (the “Build”). This ensures that the build is still Working, or “Green”. The can know that the new Functionality has not introduced a defect, or Regression. The obstacle with Regression Testing is that it can be pricey and it includes time to the Project. Balancing the costs of Regression Testing against the Velocity of the Project is an art. It is essential to ensure there is sufficient Regression Testing throughout the Project. This allows us to deliver a Quality Product without compromising the Project.

Test Driven Development: Functional Testing

Regression Testing is not restricted to Functional Testing. It can also be used on non-Functional elements of the Application. There are likewise a number of categories and classes of Testing. The nature of Regression Testing requires Automated Testing Tools. The Scrum Team (Agile Scrum Master, Scrum Product Owner and Scrum Development Team) ought to be able to produce Automated Test Scripts as well as reporting on what percentage of the Code is being Tested.

Regression Testing Basics: Automated and Flexible Test Suite.

There is no simple formula for Regression Testing; each Project requires different approaches, but there is one common measure; effective Regression Testing must be Automated. Trying to develop and run manual suites is just too complicated and time-consuming. A Regression Test suite is a living thing. As new Functionality is included in the build, the Testing used to validate the new Development needs to be incorporated into the suite for later Tests. It is likewise possible that some of the Testing has become redundant and can be eliminated. These could be discussed during the Sprint Review and Sprint Retrospective meetings. Any changes identified during these meetings could be applied as early as the next Sprint Planning meeting. Handling the Regression suite is an ongoing Task.

Some of the Tests and Aids that Play a Part.

Regression Testing has lots of flavours, from a fast peace of mind Test to a total Regression Test. Here is a quick description of them and where they play a part.

Test Driven Development: Complete Regression Test.

A complete Test is the best Test for a perfect world. Unfortunately this is not a perfect world and complete Tests are expensive. A complete Test will consist of all the Tests carried out to date, and extensive Code Coverage. Where an application is mission-critical, such as in healthcare or energy management, the expense is balanced by the confidence level of Stakeholders in a build that stays “Green”. Another instance would be where a mobile app is being Developed using a cross-platform Framework. All of the Tests utilized for the one instance, say IOS, can be applied to the Android version, once the IOS is Working and Clean.

Partial Regression Test.

The majority of Projects will only be able to Manage partial Regression Tests. These Tests would focus on high Priority Components of the Application, such as a payments gateway or security Features. Any part of the Application that has a high Risk of failure should be considered for partial Testing.

Utilizing Test Driven Development (TDD).

Test-driven Development, where Automated Test Scripts are written prior to the real Code, is a type of Regression Testing. The process starts with an guaranteed fail. This is because there is no Code. As each TDD Iteration is completed, the Code is enhanced until it passes the whole Script. This is unit Testing at its finest. In a DevOps environment, Automated unit Testing is included into the Continuous Development cycle, making the unit Code very robust.

Sanity Testing.

Peace of mind Testing concentrates on just the newest changes. This is in order to identify any apparent problems before using more extensive Testing. It is also a check that any previously reported problems have been repaired or have not recurred.

Smoke Testing.

Smoke Testing checks that the key Functionality of the Application is Working prior to running a more detailed Test. It is likewise utilized to examine that the Automated Test suite (s) can run without crashing. After all, the Test suite ought to also be Tested for integrity whenever it is changed. A Smoke Test ought to be the very first Test applied when a change is made to the setup.

Our Favourite Agile Books

We found these books great for finding out more information on Agile Scrum:

Code Coverage.

There are Toolsets readily available that can compute how much Code is covered by Test suites along with where there are spaces that might need plugging. There are various approaches of evaluating coverage, varying from lines of Code to Function points. An good Tool will have the ability to use a variety of methods.

Traceability and the Matrix.

There is much debate about whether traceability matrices add any Value to Agile Development. This is due to the fact that the development of a manual traceability matrix is very complex and time-consuming. However, there are lots of Toolsets that can automatically create the matrix. These toolsets reveal the relationship between the Requirements, the Code and the Test cases. The power of the matrix is that the trace can Work forwards from Requirement through to Testing or backwards.

Where it does come into its own is for statutory and regulative changes, like the implementation of GDPR (Europe’s General Data Protection Regulation). Recognizing which Testing covers each clause and paragraph in the Act. It likewise is an useful guide for the Customer, who can understand the relationship between the initial Requirement and the set of Test Scripts that come from that Requirement. If you are utilizing BDD (Business-driven Development) as a Framework, the matrix can be really helpful, as it frames the system in regards to business Requirements.

Where to Start.

  • Decide on a Regression technique, based upon the intricacy of the Project and the Budget offered. Do not be lured to cut corners if money and time is tight – this might result in general Project failure.
  • If you are going to need traceability, use a Tool to break down the user Requirements (such as Epics and User Stories) into trace Items, which shows what Test cases and Scripts will be required.
  • Start the Regression Test Framework. As each system Test Script is completed, it needs to be integrated into the Regression suite, especially where you are using TDD.
  • First run a smoke Test to ensure that the Automated Regression suite executes successfully without failure, and to examine that the development is “Green”. If there is a defect, log it and identify the origin and whether the defect is new or a previously fixed defect. Make a judgement call on whether you can run the Regression Test with the defect or if it should be fixed first (if it is not a showstopper – it could be a UI mistake that needs to be fixed however does not cause the program logic to fail.
  • Now run the Regression Test and assess the results. If defects emerge, but you are close to the end of a sprint, you might have to bring those defects over to the next Sprint (and the appropriate Feature or User Story will not be Accepted). You must always attempt to accomplish a Green build, otherwise the Product Quality is jeopardized.
  • Defect resolution must be speedy. The defect is logged and the Developer and/or Unit Tester of the new Code that generated the problem should fix the concern ASAP. If this is a Continuous Development Framework, there is no downtime, and the Developer( s) must quickly fix the problem. If the defect was an early bug that was previously repaired, link the new problem back to previous defect log.
  • Before your next Regression Test, decide whether you can get rid of a few of the Tests from the suite, in an effort to keep the suite compact and concentrated on the critical Tests.

Our Favourite Agile Books

We found these books great for finding out more information on Agile Scrum:

Test Driven Development: Conclusion.

Regression Testing is often practised erratically or avoided at sites where the knowledge of Automated Testing and Automated Testing Tools is limited. Often Developers do not see the Value of Regression Testing, however their eyes will be opened when they experience live instances of what Regression Testing can reveal. It is important to note that there is no one Automated Test Tool that can do it all. You may have to invest in two or more Tools to achieve the level of automation that you require.

The ‘Agile Scrum Master Training Course With 59 Seconds Training‘ is now available for free. This free Scrum Master Certified Online Training Course provides an in-depth understanding of the Agile Scrum Master roles and responsibilities, where you find out what a Scrum Master does and how to do it. During this free course you will learn all of the tools needed to succeed as an Agile Scrum Master.

Thank you for choosing us to learn about the Agile Scrum Framework.