Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 558647
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T12:09:15+00:00 2026-05-13T12:09:15+00:00

Maintaining unit tests is difficult. I am sure that we all have experienced a

  • 0

Maintaining unit tests is difficult. I am sure that we all have experienced a time when a seemingly small change to the system under test caused dozens of unit tests to fail. Sometimes these failures reveal bugs in the SUT, but often the tests are out of date and no longer reflect the correct behavior of the SUT. In these cases, it is necessary to fix the broken tests.

Have you encountered this situation? Does it happen often? What change did you introduce and how did the failures manifest? Did you fix the broken tests or simply delete them? If the former, how? If the latter, why? How does the fear of failures affect your desire to write tests?

I would also like to find specific examples of broken tests. Do you know of any open-source applications that evolved in ways that caused tests to fail?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T12:09:15+00:00Added an answer on May 13, 2026 at 12:09 pm

    Maintaining unit tests is difficult.

    True enough. The co-evolution of production code and test code together is hard. Both kinds of code shares similiarities (e.g. naming convention), but they still differ in nature. For instance the DRY can be violated in test code if necessary; code duplication would indeed be found easily as test would break in both place. The tension between test and production code results sometimes in specific design trade-off (e.g. dependency injection) to ease testability. Again, these tensions are relatively new, and the relationship between the design on production code and the effort in maintenance is not well understood. The article “On the interplay between software testing and evolution” is great (I was not able to find it in PDF, but didn’t google for a long time).

    I am sure that we all have
    experienced a time when a seemingly
    small change to the system under test
    caused dozens of unit tests to fail.
    Sometimes these failures reveal bugs
    in the SUT, but often the tests are
    out of date and no longer reflect the
    correct behavior of the SUT. In these
    cases, it is necessary to fix the
    broken tests.

    Defect localization – the ability of a test suite to pinpoint defect precisely – is also only partially understood. What are the best strategies to design test suites resulting in high defect localization is not clear. Most tests have some overlap between them, which cause low defect localization. Ordering tests so that they depend on each other improves this aspect, but at the same time goes against the principle of having isolated tests. We see a growing awareness of such tensions, but there is not definitive solution to address these issues. Here is an article about exploiting dependencies between tests.

    The problem of outdated or irrelevant tests (those who don’t cover anything at the end) is also growing awareness. Test coverage is not enough and high quality test suite require experience, or at least, some education. See this article about the 100% coverage myth.

    How does the fear of failures affect
    your desire to write tests?

    You have to find a balance between (1) initial time invested in test suite (2) effort in maintenance and (3) effectiveness of the test suite. I write mostly what I call “inflection point tests” and here my view on the subject.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have an autotools project that has a mixture of unit and integration tests,
While maintaining some code, I discovered that we have an infinite hang-up in a
I'm currently maintaining an application and noticed that many of the objects that have
m maintaining a project, that has to be compatible through PHP 4.X to 5.2.
I am maintaining a web application that uses java.protocol.handler. I initialize it with a
I'm currently maintaining an "old" system written in C# .NET, removing some obsolete features
I'm maintaining a script that can get its input from various sources, and works
I'm maintaining an in-house ORM written in C#, and it currently does not have
Our team is willing to unit-test a new code written under a running project
I have a couple of unit test helper extension methods, such as, IsNotEmpty(this string

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.