Testing & Maintenance Interview Questions Software Engineering (original) (raw)

Last Updated : 1 Sep, 2025

Testing ensures that software functions correctly, meets requirements, and is free of defects by using techniques like unit testing, integration testing, system testing, and acceptance testing. Maintenance involves updating and improving software after deployment to fix bugs, adapt to changing environments, and enhance features.

1. Why is exhaustive testing impossible in practice, and what strategies are used instead?

**Reason: Exhaustive testing means testing every input, path, and state, which is infeasible due to combinatorial explosion. For example, A function accepting a 10-digit number has 101010^{10}1010 possibilities - impossible to test in finite time.

**Strategies instead:

**Outcome: Maximizes defect detection efficiently while balancing coverage, time, and cost.

2. Compare regression testing and retesting, and explain their role in maintenance.

3. How does white-box testing differ from black-box testing, and when is each most effective?

**White-box Testing:

**Black-box Testing:

**Together: Provide _complementary coverage - correctness of both internal structure and external behavior.

White-box testing is best during unit testing and for detecting hidden logic errors, while black-box testing excels in system and acceptance testing to validate requirements. Together, they provide comprehensive coverage, ensuring both correctness and reliability.

4. What challenges arise in maintaining legacy systems, and how can they be mitigated?

**Challenges:

**Mitigation strategies:

**Impact: Reduces risk, cost, and instability over time.

5. Why is test automation not always the best solution?

**Pros of automation: Speed, repeatability, scalability (good for regression, load, stress).

**Limitations:

**Best approach:

**Outcome: A balanced hybrid strategy ensures both efficiency and effectiveness.

6. Explain the role of performance testing in software maintenance.

**Purpose: Verifies that updates do not degrade system speed, scalability, or stability. Even a small code change (e.g., a new query, API call, or algorithm) can cause performance regressions.

**Key types:

**In maintenance: Continuous performance monitoring detects memory leaks, bottlenecks, or gradual slowdowns early.

**Outcome: Preserves consistent user experience and prevents performance-related production failures

7. How do you prioritize bug fixes during maintenance when resources are limited?

**Factors considered:

**Example priority levels:

**Process: Defect triage meetings with stakeholders ensure alignment between technical urgency and business priorities.

**Result: Limited resources are focused on defects with the highest risk and business impact.

8. Describe the difference between adaptive, perfective, corrective, and preventive maintenance.

Example:

Upgrade DB to a new version (adaptive)
Optimize queries for faster execution (perfective)
Fix incorrect calculation in reports (corrective)
Refactor poorly structured modules to reduce future bugs (preventive)

9. How do continuous integration (CI) and continuous deployment (CD) impact testing and maintenance?

**CI (Continuous Integration): Developers merge code frequently -> automated builds + tests catch defects early.

**CD (Continuous Deployment): Automates deployment -> quick delivery of fixes and updates to production.

**Impact on maintenance:

**Risk: Without strong automated test coverage, CI/CD may speed up delivery of defects.

**Best practice: Pair CI/CD pipelines with comprehensive unit, integration, and regression test suites.

10. What is the role of configuration management in software maintenance?

**Definition: Process of tracking and controlling versions, dependencies, and environment settings.

**Benefits in maintenance:

  1. Prevents “it works on my machine” issues by standardizing environments.
  2. Enables safe rollbacks if updates fail.
  3. Provides traceability for when/why changes were made.
  4. Supports consistent deployments across dev, test, and prod.

**Tools: Git (version control), Docker (environment isolation), Ansible (infrastructure automation).

**Without it: Debugging becomes chaotic, releases risk overwriting stable configurations, and disaster recovery becomes difficult.

11. How can you ensure backward compatibility while fixing bugs in production software?

Backward compatibility means new changes should not break existing user workflows or dependent systems. Strategies include:

Example: If a library function changes parameter order, maintain the old function as a wrapper to the new one until all clients update. Ignoring this can cause widespread failures in integrated systems.

12. Explain the concept of "flaky tests" and their impact on CI/CD pipelines. How can they be handled?

A flaky test passes or fails inconsistently without code changes, often due to timing issues, race conditions, or dependency on external systems. In CI/CD, flaky tests waste developer time, delay releases, and reduce trust in automation.
**Solutions:

13. How can technical debt affect software testing and maintenance?

Technical debt from shortcuts (poor design, missing tests, hardcoding) slows down maintenance and increases the risk of defects. In testing, it leads to low coverage, fragile tests, and difficult debugging. Over time, fixing even small bugs becomes expensive.
**Mitigation:

If ignored, technical debt compounds, leading to “software rot,” where maintenance becomes unfeasible.

14. What’s the difference between hotfix, patch, and service pack in maintenance?

**Hotfix

**Patch

**Service Pack (SP)

Note: In maintenance, hotfixes prioritize speed over testing depth, while patches undergo moderate testing. Service packs focus on stability, tested thoroughly before release.

15. Why is mutation testing considered a strong measure of test quality?

16. How does root cause analysis (RCA) improve maintenance quality?

**Definition: RCA (Root Cause Analysis) is a structured method for identifying the _fundamental reason behind defects or failures, instead of repeatedly fixing only their symptoms.

**Importance in maintenance:

**Common RCA techniques:

**Example: A recurring crash is reported.

17. How do you measure the effectiveness of a testing process during maintenance?

**Key metrics:

Note: Continuous improvement uses these metrics to balance coverage, cost, and speed.

18. In what scenarios would exploratory testing be more valuable than scripted testing during maintenance?

Exploratory testing is valuable when:

Note: It allows testers to use intuition and domain knowledge to find issues quickly. Scripted tests ensure coverage; exploratory tests uncover unknown unknowns.

19. How do you ensure software maintainability during the initial development phase?

Maintainability starts early with:

Note: Skipping this leads to brittle systems where small fixes require large rewrites.

20. What role does defect aging play in maintenance prioritization?

**Definition: Defect aging refers to the time a defect stays unresolved in the system, measured from the date it was reported to the date it is fixed.

**Role in prioritization:

**Impact on maintenance:

**Example: If a minor UI bug has been open for months, it’s tolerable. But if a critical login failure has aged for weeks, it signals a serious maintenance flaw needing immediate escalation.