---
title: "Software bugs and testing techniques"
subject: "Instrumentation II"
chapter: 9
key: "semester_5/instrumentation_ii:bug-types-testing"
source: https://www.bctengineer.com/q/semester_5/instrumentation_ii/bug-types-testing
site: BCT Engineering
---

# Software bugs and testing techniques

Instrumentation II · Chapter 9: Software For Instrumentation And Control Applications

- Asked in: 2078 Kartik, 3+5 marks; 2076 Asoj, 6 marks (asked 2 times)
- Video: [Types of Testing in Software Engineering | Levels of Testing](https://www.youtube.com/watch?v=T0TynxN77oY) — Gate Smashers
- Answer checked by Claude Sonnet 5.5 on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_5/instrumentation_ii/bug-types-testing
- Whole chapter: https://www.bctengineer.com/md/semester_5/instrumentation_ii/chapter-9

## Question

Explain the different types (phases of introduction) of software bugs. How can these bugs be identified using different software 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.

## Answer

#### 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.

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. Which bug arises when modules don't work together due to interface mismatch?
   A. Requirements bug
   B. Coding bug
   C. Maintenance bug
   D. Integration bug
   Answer: D. Integration bugs come from interface, data or timing mismatch. (Key point: Types by phase)

2. Regression bugs are introduced by what?
   A. Changing or fixing the code
   B. Wrong customer needs
   C. Syntax errors in first coding
   D. Hardware wear
   Answer: A. Maintenance or regression bugs appear after changes. (Key point: Regression bugs)

3. Black-box testing mainly checks what?
   A. Statement and path coverage
   B. Outputs against the specification without knowing internals
   C. Internal loops
   D. Memory addresses
   Answer: B. Black-box uses specification, e.g. equivalence partitioning. (Key point: Black-box testing)

4. Which technique is white-box?
   A. Boundary value analysis
   B. Decision tables
   C. Branch and path coverage
   D. Beta testing
   Answer: C. White-box uses code structure for coverage. (Key point: White-box testing)

## Related in Instrumentation II

- [Phases of introduction of bugs in software](https://www.bctengineer.com/question.md?key=semester_5%2Finstrumentation_ii%3Abugs-introduction) — Instrumentation II, chapter 9, asked 2×
- [Software maintenance and fixing common bugs](https://www.bctengineer.com/question.md?key=semester_5%2Finstrumentation_ii%3Asw-maintenance-bugs) — Instrumentation II, chapter 9
- [Software testing time paradox](https://www.bctengineer.com/question.md?key=semester_5%2Finstrumentation_ii%3Asw-testing-paradox) — Instrumentation II, chapter 9

## Related in other subjects

- [Software testing metrics](https://www.bctengineer.com/question.md?key=semester_5%2Fsoftware_engineering%3Atesting-metrics) — Software Engineering, chapter 8
