In software engineering, what is meant by injected defects? And if such type of defect arises during software testing, then how are injected defects handled? Also how can the rate of occurrence of these defects be reduced?


4 Answers 4


To put the other answers in context, there are some related ideas here, which may be stomping on each other.

  • Defect insertion (or discovery) -- reference to which phase of system (e.g., requirements development, design, development, implementation, integration, test, sustainment) a defect was inserted/injected (or discovered) in the product. So a defect that was inserted at requirements time (e.g., a user requirement that was misinterpreted) and discovered at integration time would exhibit bad defect containment.

  • Failure or Fault Injection -- The intentional injection of a failure condition into a running system during a test activity, to determine whether the system reacts well to off-nominal or exceptional conditions.

  • Defect injection -- Deliberately inserted defects, inserted at any phase, and intended to determine the effectiveness of quality assurance, testing, or defect containment discipline. Also known as "defect seeding".


An injected defect is adding defects to a system on purpose during testing, to test and verify that the system behaves as expected in those situations.

This is good testing practice, and nothing that should be reduced or avoided.

Examples of such defects can be:

  • Introducing unreliable network traffic.
  • Testing with a full hard drive.
  • Testing with some hardware component malfunction.
  • Testing in out-of-spec electrical conditions.

I would understand this to mean either fault injection which @Anders covered in his answer or the same thing as defect seeding or error seeding.

Error seeding is a way of implementing a metric for checking how good testing is done for a system. It would be nice to know how large percent of defects the testing is finding or how many bugs still exists in the system. Unfortunately we do not know the total number of defects existing in the system. The idea of error seeding is to introduce a number of known bugs to the system and then count how many of those testing finds. This ratio can be then used for estimating the amount of unknown real bugs in the system.

If used, the following things need to be considered:

  • The injected defects should cover the whole system and have full range of severities to give correct picture of the test effectiveness. This is quite hard to achieve.
  • Think how your people will react to this kind of measurement. Should you tell beforehand that there are injected defects?
  • Make sure that you remember to remove the injected defects before releasing the product.

You're getting some good answers on the first part of your question (what are injected defects?) but all seems quiet on your second question (how can they be reduced?)

Sound software engineering principles should help, such as:

  • Know your requirements
  • Perform reviews
  • Plan thorough testing early

As others have alluded to, early detection is perhaps more important than defect reduction. Defects will happen; however, if these defects are detected and removed earlier rather than later, the negative consequences can be drastically diminished.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.