Skip to content
Unit 5 Syllabus Note· Software Engineering

Software Engineering

Comprehensive exam revision notes for BCA-423E Unit 5 (Software Testing, Maintenance, Reliability & Reengineering). Includes Section A (2M), Section B (5M), and Section C (15M) questions, answers, and diagrams.

Software Engineering

Software Testing, Maintenance, Reliability & Reengineering

Core Definitions & Key Concepts

Error, Fault (Bug), and Failure

  • Error: A human developer mistake or misunderstanding during design or coding.
  • Fault (Bug): The physical flaw or incorrect line written into the software code.
  • Failure: The observable departure of program execution from its specified requirements.

Verification and Validation

  • Verification: 'Are we building the product right?' Checks conformance to specifications without running code (reviews, walkthroughs, inspections).
  • Validation: 'Are we building the right product?' Executes code to ensure it satisfies user needs (system & acceptance testing).

What are Test Stubs and Test Drivers in integration testing

  • Stub: A dummy called routine simulating unfinished lower-level modules in Top-Down testing.
  • Driver: A dummy calling routine that invokes the module under test in Bottom-Up testing.

Alpha Testing and Beta Testing

  • Alpha Testing: Acceptance testing conducted by users at the developer's site in a controlled lab environment.
  • Beta Testing: Acceptance testing conducted by real end-users in their own live operational environments at customer sites.

What are the four recognized categories of Software Maintenance

  1. Corrective: Fixing residual bugs/defects.
  2. Adaptive: Adapting software to changes in OS, hardware, or statutory laws.
  3. Perfective: Adding new user features and improving performance (over 50% of cost).
  4. Preventive: Refactoring code to enhance future maintainability.

State the formulas for MTBF and System Availability (A)

$MTBF = MTTF + MTTR Availability (A) = \frac{MTTF}{MTTF + MTTR} × 100\%$

What is Mutation Testing

A fault-based testing technique where intentional syntactic mutations (errors) are injected into the source code to verify whether the test suite detects and 'kills' the mutants.

What is Cleanroom Software Engineering

A formal software development philosophy combining mathematical formal specifications, box structure designs, and statistical usage testing to certify correctness without standard trial-and-error unit debugging.

Conceptual & Architectural Analysis

Compare Black-Box Testing vs White-Box Testing in a Structured Matrix

DimensionBlack-Box Testing (Functional)White-Box Testing (Structural)
Knowledge of CodeZero knowledge of internal code structureFull access to source code and control logic
Basis for TestsRequirements specification (SRS)Control flow graphs, logic branches, conditions
Performed ByIndependent QA Testers / End-usersSoftware Developers / Test Engineers
Core Techniques- Equivalence Class Partitioning (ECP)<br>- Boundary Value Analysis (BVA)<br>- Cause-Effect Graphing- Statement Coverage<br>- Branch / Decision Coverage<br>- Basis Path Testing
Primary ObjectiveValidate external functional behaviorVerify internal algorithms and code paths

Equivalence Class Partitioning (ECP) and Boundary Value Analysis (BVA) with a Practical Case

Black-Box Testing Case Study

Requirement: An employee bonus calculator accepts integer years of service between 1 and 30 years.

1. Equivalence Class Partitioning (ECP):

  • Invalid Partition 1: Years < 1 (e.g., -5, 0) \implies Rejection.
  • Valid Partition: 1 ≤ Years ≤ 30 (e.g., 15) \implies Bonus Calculated.
  • Invalid Partition 2: Years > 30 (e.g., 35, 100) \implies Rejection.

2. Boundary Value Analysis (BVA):

Experience proves errors cluster at boundaries (min, min+1, nom, max-1, max):

  • Lower Boundary: 0 (Invalid), $1$ (Boundary), 2 (Valid).
  • Nominal Value: 15 (Valid).
  • Upper Boundary: 29 (Valid), $30$ (Boundary), 31 (Invalid).
  • Test Values: 0, 1, 2, 15, 29, 30, 31.

Top-Down vs Bottom-Up Integration Testing Strategies

FeatureTop-Down IntegrationBottom-Up Integration
Starting PointMain control executive moduleLowest-level leaf modules
Scaffolding NeededRequires Stubs to simulate lower childrenRequires Drivers to simulate calling parents
Early AdvantageMajor architectural control verified earlyCritical low-level I/O & utility routines verified early
DisadvantageStubs are complex to mock realisticallySystem architecture is not seen until final integration

Software Maintenance Cost Distribution and Maintenance Process

Software Maintenance Effort Distribution

Empirical software engineering data reveals that maintenance consumes 60% to 80% of total lifecycle cost:

  • Perfective Maintenance: 50% to 55% (Continuous feature requests, UI upgrades).
  • Adaptive Maintenance: 20% to 25% (OS migrations, cloud deployment).
  • Corrective Maintenance: 15% to 20% (Bug fixes).
  • Preventive Maintenance: 5% (Code refactoring).
System Architecture / Concept DiagramHorizontal Scroll Enabled
Change Request ---> Impact Analysis ---> Approval ---> Design Update ---> Regression Test ---> Baseline

In-Depth Analysis & Implementation

Solve a Comprehensive Software Reliability Problem Calculating MTTF, MTTR, MTBF, and Percentage Availability

University Examination Model Numerical Solution

Operational System Metrics for a Web Server over 1 Year (8,760 Hours):

  • Total operational runtime observed: 8,760 hours.
  • During the year, the server experienced 6 unexpected crashes (failures).
  • Total downtime spent diagnosing and repairing the 6 failures: 30 hours.

Step-by-Step Mathematical Derivations:

  1. Total Uptime:

$Uptime = Total Time - Downtime = 8,760 - 30 = \mathbf{8,730 hours}$

  1. Mean Time To Failure (MTTF):

$MTTF = \frac{Total Operational Uptime}{Number of Failures} = \frac{8,730}{6} = \mathbf{1,455 hours}$

  1. Mean Time To Repair (MTTR):

$MTTR = \frac{Total Repair Downtime}{Number of Failures} = \frac{30}{6} = \mathbf{5 hours}$

  1. Mean Time Between Failures (MTBF):

$MTBF = MTTF + MTTR = 1,455 + 5 = \mathbf{1,460 hours}$

  1. Percentage Availability ($A$):

$A = \frac{MTTF}{MTBF} × 100 = \frac{1,455}{1,460} × 100 = \mathbf{99.657\%}$

The system satisfies 'Three Nines' availability standards.

Code Coverage Metrics in White-Box Testing (Statement, Branch, Condition, Path Coverage) with Code

C
1// Code Segment to evaluate test coverage
2int process_order(int stock, int is_vip) {
3 int discount = 0;
4 if (stock > 0) { // Decision 1
5 if (is_vip == 1) { // Decision 2
6 discount = 20;
7 }
8 }
9 return discount;
10}

1. Statement Coverage vs Branch Coverage Trap:

  • Test Case 1: stock = 10, is_vip = 1 \implies Executes all lines! 100% Statement Coverage achieved!
  • Vulnerability: If stock = 0, an implicit else branch exists that was NEVER tested! Branch coverage is only 50%.

2. Comprehensive Coverage Hierarchy:

  1. Statement Coverage: Percentage of executable lines traversed.
  2. Branch (Decision) Coverage: Every if/else branch evaluates to both TRUE and FALSE.
  3. Condition Coverage: Each individual boolean sub-condition in a compound expression evaluates to TRUE and FALSE.
  4. Path Coverage: Every distinct combination of paths from entry to exit is executed (most rigorous; required in aerospace).

The Software Reengineering Lifecycle: Reverse Engineering, Code Restructuring, and Forward Engineering

The Software Reengineering Paradigm

System Architecture / Concept DiagramHorizontal Scroll Enabled
Legacy System                           Target System
=================                       =================
Legacy Source Code                      Modern Source Code
      |                                         ^
      | (Reverse Engineering)                   | (Forward Engineering)
      v                                         |
Design Abstractions === (Restructuring) ===> Modern Architecture
(DFDs, Call Graphs)                          (Clean Microservices)

3 Stages of Software Reengineering:

  1. Reverse Engineering: Analyzing legacy binaries and unmaintained source code to extract high-level architectural designs, entity relationships, and business rules.
  2. Restructuring & Refactoring: Removing code smells, eliminating dead code, transforming spaghetti code into modular functions, and migrating data schemas without altering business rules.
  3. Forward Engineering: Re-implementing the modernized design using contemporary programming languages, frameworks, and modern automated CI/CD testing pipelines.

Important Exam Points & Quick Revision

Solve the numerical problem for MTTF/MTTR/Availability, explain ECP/BVA with boundary values, and contrast Black-box vs White-box testing.

Your reading progress
0%

100% left on this page — finishing it closes the gap for Software Testing, Maintenance, Reliability & Reengineering.

Weak topic hint

Software Testing, Maintenance, Reliability & Reengineering still counts as a weak topic until you finish this note and answer its questions.

Practise this unit
What Should You Do Next?

Test Your Understanding

Now that you've read through these notes, practice unit MCQs to identify weak points and solidify your learning before exams.