Test Debt in automated and manual testing

Test automation is essential to keep up with the pace of modern application development. Over the years, however, test automation tools have failed to keep up. The problem is that most older test automation tools rely on test scripts. However, test scripts are known for breaking when the application changes. As a result, testers have to spend more and more time maintaining tests and less and less time creating tests. On the other hand, they stop focusing on their main goal, which is to ensure that the software is bug-free and reliable. We call this problem test debt.

Test capacity

Each team has limited capacity to spend on test automation. They must split this time between creating tests and analyzing test results. When a team starts automating tests, they have a lot of spare test capacity. However, this quickly diminishes as IT Tester Consultant Medior becomes familiar with the tools and starts automating more tests. More automated tests means more test results to analyze. Eventually, testers reach their total testing capacity.

Change of selectors when updating the application

However, there is a catch. The test scripts rely on selectors (such as element ID or xpath) to find elements in the UI. For example, you can tell the scripts to click a specific button or enter text in a specific field. The problem is that these selectors change unpredictably. Even simple changes to styles or layouts can cause a script to select the wrong button to test or enter text in the wrong field. As a result, when you update your application, your tests suddenly fail. In a few cases, this can be a real bug. But more often, the test simply needs to be fixed.

Test maintenance vs. test creation and test team capacity

As a result, testers are starting to spend more and more time maintaining tests and less and less time creating tests. On the other hand, they stop focusing on their main goal, which is to ensure that the software is bug-free and reliable. Now, if you add that into the equation, you can see that you’ll quickly run into a problem. The total work required far exceeds their capacity. This phenomenon is called test debt.

What is test debt?

Test debt is one of the thirteen types of technical debt (tech debt or code debt). It is the extra time that testers have to allocate to complete test activities that should have already been done. When test debt builds up, testers can feel frustrated and overwhelmed, causing them to fall behind on their regular duties.

What is test debt?
SOURCE: functionize.com/reduce-test-debt

Test debt has quite similar characteristics to technical debt. It is actually a metaphorical burden that accumulates when testing tasks are deferred during software development. Like technical debt in code, test debt can hinder a project’s progress and quality. Imagine you have a bicycle, but instead of fixing the wobbly wheel right away, you continue to ride it. Eventually, this small problem can cause a bigger problem or even an accident. It’s similar with test debt. If you skip some tests or don’t address issues in the testing process, over time these inadvertences can make things much more complicated than they should be.

Why is the test debt emerging ?

Test debt often arises due to time constraints, insufficient resources or changing project priorities. Developers and testers may not prioritize the test creation and maintenance process and procrastinate to meet deadlines, leading to a growing backlog of test work. Teams don’t end up in test debt overnight. It takes time, and it’s the accumulation of many short-term and wrong decisions that cause this. Below, we’ve listed a few possible reasons for the emergence of test debt.

– Lack of resources and capacity

A shortage or sudden change in resources is a frequent cause of test debt. For example, if the ratio of testers to developers is unbalanced, testers may be overwhelmed by the amount of work being put on them. In addition, redundancies can cause test debt because the remaining testers are likely to be expected to maintain the testing capacity of the team despite the removal of resources.

– Time constraints

No one wants to be the cause of a delayed release or feature release, especially if it’s because they need more time to complete their work. Testers are often bound by time limits within a sprint or iteration, which can sometimes be unrealistic.

– Automation

Test automation has the potential to cause test debt because it can be difficult to maintain. For example, when user interface (UI) elements change, tests calling previous elements break. Testers responsible for automation must evaluate what went wrong and then update the test. As the number of test cases increases, the time required to maintain the automated code also increases. Another way automation can cause test debt is in the analysis of results. Code can be run and tested automatically, but it also takes time for someone to analyze the test results.

– Scale-up

When requirements are vague, ambiguous or prone to change, we often encounter scope creep. This leads to increased development time and increased testing time. Testers often feel this the most as more work done is expected, but in the same amount of time.

– Poor planning

Appropriate planning could prevent many of these problems. Technical fine-tuning and sprint planning should include determining the time required to test the function as well as the time required for all testing activities.

What are the warning signs of test debt?

The main goal of test automation (check also our article about automation testing tools) is to speed up software delivery while maintaining confidence in quality and process. However, the value of test automation diminishes when teams resort to circumventing it due to issues such as increased execution time, instability, or lack of understanding. Test debt may not have a specific metric, but it becomes obvious when you look for early warning signs.

  • Often test coverage is not fully completed and this introduces gaps in the test suite. These gaps in test coverage, such as untested code paths or missing scenarios, indicate test debt.
  • If previously resolved issues frequently reappear, this may be a sign of insufficient testing. It suggests that the testing process may not comprehensively cover all scenarios or that new changes inadvertently reintroduce old problems. Such patterns highlight the importance of improved testing practices and vigilance in maintaining software quality.
  • Overly complex or out-of-date test cases can increase test execution time, hindering efficiency. Many tests can be written for an application and therefore it takes more time to execute the entire test suite.
  • The increasing number of bugs after release suggests that testing efforts require improvement.
  • Tests that depend on other tests are also a problem. It is not recommended to have dependencies between tests, because if the parent test fails, all dependent tests will also fail. Independent tests are easier to maintain.

Negative effects of test debt on the test team

Test debt is not only annoying for testers, it can potentially cause many problems for the product and stakeholders. Below are a few possible consequences to consider when test debt arises:

  • System Stability – When regression testing is ignored or performed poorly, an otherwise normally stable system may experience failures. Rushed fix can backfire if it has not been adequately evaluated.
  • Reputation – The credibility of a system can be lost when one mistake after another is discovered. This can damage a product’s reputation, which can cause users to switch to competing products. Consequently, the company’s reputation can also be negatively affected, which can lead to users avoiding all of its other products.
  • Frustration – When test debt builds up but there are no a plans of correction in place, teams can feel frustrated. When this happens, talented team members with excellent product knowledge may seek employment elsewhere. This is one of the most undesirable consequences of test debt.
  • Financial loss – When systems fail and a company goes down, some people have what is known as the “rat instinct”, i.e. they abandon ship before it finally starts to sink. The smartest ones assess the situation and may go somewhere where the problems are not present, which can have a negative economic impact.
  • Reduction in software quality – Test debt can reduce the quality of the software. It can degrade the user experience, as these bugs often manifest as unexpected and problematic issues for end users.
  • It’s holding back the speed of development- Accumulated testing debt hinders the speed of development by requiring additional time and effort to address testing deficiencies, which can lead to project delays and missed deadlines. These delays occur because teams must allocate resources to catch up on testing tasks and fix issues that have accumulated due to postponed testing efforts.

Repeatedly encountering such problems without a clear solution in sight may even lead some members to question the effectiveness of their workflow or the quality of the tools they use. Over time, this can lead to reduced job satisfaction, lower performance and less motivation to deliver quality outputs affecting the overall productivity of the team.

Tips on how to avoid or manage test debt

Test debt can often be avoided by following the right procedures. However, if test debt is unavoidable, there are ways to manage it. Managing test debt means that, similar to the financial debt analogy, you create a plan to pay it off by scheduling it into your time budget.

  • Test Planning – As mentioned above, proper test planning can alleviate much of the testing debt. When planning, allocate the time required for all test activities such as design, execution, documentation, regression, automation creation, automation maintenance, and test termination activities. Communicate the plan so that the entire team understands your responsibilities and values your time.
  • Test Review – Some companies require a test review before tests can be performed. A test review is similar to a code review. Another tester on your team reviews the test cases you created and looks for other relevant cases that need to be added or other tests that need to be executed.
  • Innovation – In the Scaled Agile Framework (SAFe), iterations end with an innovation week. Other agile methods include a technical debt sprint or something similar. This is an opportunity to prioritize and catch up on test debt.
  • Create Tasks – Create a test debt as a task or other backlog item. Prioritize the tasks and provide time estimates, noting any possible dependencies. This process will reinforce the concept of test debt for yourself and your team. It also offers the potential to make management, executives, or scrum masters more aware of test debt and the reality it represents.
  • Leave yourself room in every sprint – In every sprint, leave yourself enough room to solve the test debt. Prepare before planning a sprint by knowing your capacity and then include test debt problems in the sprint according to your capacity.
  • Scout rule – leave test cases in better condition than when you found them. If you are reviewing some test cases, update them as needed. By making these updates ahead of time, you’ll reap the benefits of the time saved in the future.

Identification and prioritisation of technical debt

QA teams can provide valuable insight and support in identifying areas of the product that may need refactoring or repair, as well as developing and implementing strategies to address these issues.

  • Participation in code review

The test team can play an important role in advocating for the allocation of resources to technical debt tasks, ensuring that these tasks receive the attention and priority they need.

  • Test early and often

Early and frequent testing by QA teams can help catch issues and bugs early, which can reduce the need for quick fixes and minimize the accumulation of technical debt.

  • Work closely with developers

Focus on allocating the necessary resources to address and resolve the debt.

  • Regularly review and update testing processes

Continuous refinement and optimization of testing approaches can help minimize the risk of incurring new technical debt during the development process.

Test debt under manual testing

Test debt also occurs when testing processes rely heavily on manual tests without proper documentation or automation. This debt arises when testers repeatedly execute repetitive, time-consuming test cases manually, leaving room for inconsistencies, human error, and overlooked scenarios. As software evolves, the absence of automated regression tests can lead to delayed bug identification and increased testing effort. Due to tight deadlines, testers may not have the time or resources to create and execute complex test cases. This can result in gaps in test coverage, leaving some parts of the software untested. Limited availability of qualified testers can affect the ability to thoroughly test software, especially in complex or large-scale projects. Which contributes to test debt in manual testing.

  • Limited test execution – it is often the case that the resources and time available to conduct full and comprehensive testing are insufficient. Therefore, testers only perform a subset of tests for a given version, increasing the possibility of bugs.
  • Incorrect test design – manual testing is a time-consuming and strenuous process. A test case can be designed with many variations using different combinations of data, but then the tester needs to execute all these combinations. Since executing all combinations of test cases is a strenuous process for testers, they are limited to only a few happy scenarios when testing, thus shortening the test design. This increases the risk of residual errors in the system under test (SUT).
  • Missing test reviews – test reviews help to improve the quality of test cases and also help to find problems earlier. Missing test reviews could delay finding bugs or increase test case maintenance.

Test debt in automated testing

When automated testing scripts age and fail to adapt to the dynamic nature of software development, they contribute to test debt, which hinders the automated testing process and reduces its value in software quality assurance. Also, there may be unreliable tests that sometimes pass and sometimes fail without changes to the application under test, and these tests should be removed and fixed to avoid test debt. Automated testing involves executing pre-written tests that are executed and checking the results without manual intervention. A list of factors that contribute to test debt in automated testing is as follows:

  • Inappropriate or insufficient infrastructure – Tests performed on an infrastructure that does not resemble the customer’s infrastructure could lead to unpredictable software behaviour, resulting in reduced confidence in the system.
  • Lack of coding standards – automated tests must adhere to a common coding standard. If a common coding standard is not adopted and adhered to, the effort to maintain the test code increases.
  • Not fixed (broken) tests – Failure to fix broken tests or to update tests when functionality changes reduces confidence in tests, lowers quality and increases maintenance effort.
  • Using Record & Replay – It’s easy to use the Record & Replay tools to test applications with a graphical user interface (GUI). However, there are a number of drawbacks to using this feature. Better alternatives may be available instead of the Record & Replay tools.

How do you choose a tool that will help keep test debt to a minimum?

Choosing a test tool that will minimize your test debt involves several critical aspects. First, prioritize test automation capabilities and make sure the tool supports a variety of test types and scripting languages. An easy-to-use, codeless or low-code interface that allows a wider range of team members to contribute effectively is essential for efficient test creation and maintenance. Scalability is also important, opt for a tool that can adapt to the evolving needs of your organization, adapting to different environments and devices for comprehensive test coverage. Next, look for integration features that can interface with existing development and testing tools, such as CI CD pipelines and bug tracking systems, to streamline workflows and reduce testing debt. Also read our article Best testing artificial intelligence tools.

Conclusion

Test debt is an issue that can cause serious problems. Sometimes the best choice for project management in certain circumstances is to create a test debt to be resolved later. Other times, test debt builds up to the point that it can become overwhelming. By proactively planning tasks to reduce test debt, teams can become more aware of their decisions and the debt can be prioritized. If you speak German and are IT tester or IT Automation Tester, check out our employee benefits and respond to job offers.

About the author

Michaela Kojnoková

Agile Test Engineer

Po štúdiu informatiky na ŽU a TUKE som sa najviac ponorila do oblasti automatizácie testovania. Okrem toho sa venujem tvorbe webov, databázam, dátovej analytike, umelej inteligencii a strojovému učeniu. Mám rada cestovanie, šport a najviac si užívam čas strávený v prírode s mojimi blízkymi. LinkedIn

Let us know about you