Skip to main content

Software bugs and testing techniques

Short answer

Bugs by origin: requirements, design, coding, integration, regression. Testing includes static analysis, black-box (equivalence partitioning, boundary value), white-box (coverage), unit, integration, system, acceptance, and regression tests. Embedded adds HW-in-the-loop.

Explain the different types (phases of introduction) of software bugs. How can these bugs be identified using different software testing techniques?

Types of bugs (by phase of introduction)

  1. Requirements bugs: incomplete, inconsistent or wrong requirements; misunderstanding of what the customer wants.
  2. Design bugs: wrong architecture, algorithm or interface; missing error handling.
  3. Coding bugs: syntax errors, logic mistakes, uninitialised variables, array bounds, memory leaks, data-type errors.
  4. Integration bugs: modules do not work together because of interface and data mismatch, timing, or hardware-software interaction.
  5. Maintenance/regression bugs: introduced when changing or fixing the code.

Testing techniques to identify them

  • Static techniques: reviews, walkthroughs, inspections and static analysis of requirements, design and code find bugs without running the program.
  • Black-box (functional) testing: test the outputs against the specification, without knowing internals; uses equivalence partitioning, boundary value analysis, decision tables. Finds requirement and functional bugs.
  • White-box (structural) testing: uses the code structure: statement, branch and path coverage, loop testing. Finds coding and logic bugs.
  • Unit testing: each module tested separately (by the developer).
  • Integration testing: modules combined step by step (top-down, bottom-up) to find interface bugs.
  • System testing: the complete system against requirements: performance, stress, security, recovery.
  • Acceptance testing: alpha (at developer site) and beta (at user site) tests by the customer.
  • Regression testing: rerun old tests after changes to find newly introduced bugs.
  • For embedded software, hardware-in-the-loop testing and simulation are also used.

✓ Answer checked by Claude Sonnet 5.5

All Instrumentation II chapter 9 questions →