Skip to main content

Functional versus structural testing; COCOMO for 200 KLOC

Short answer

Functional testing checks behavior from specifications; structural testing checks internal code paths. For 200 KLOC with nominal COCOMO II factors, effort is about 997 person-months, development time about 33 months, average staffing about 30 persons, and productivity about 201 LOC per person-month.

Differentiate functional and structural testing. For 200 KLOC, calculate effort per month, development time, average staffing and productivity rate considering COCOMO-2 for reference.

Functional versus structural testing

Functional testing (black-box) derives test cases from the specification and checks what the system does. Structural testing (white-box or glass-box) derives test cases from the internal code structure and checks how it does it.

PointFunctional testingStructural testing
BasisRequirements/specificationSource code, control flow
Code knowledgeNot neededNeeded
TechniquesEquivalence partitioning, boundary values, decision tablesStatement, branch, path coverage, basis path
MeasuresRequirements coverageCode coverage
FindsMissing functions, interface, performance errorsLogic errors, dead code, wrong conditions
LevelSystem, acceptanceUnit, component
Done byIndependent testers, usersDevelopers
ExampleLogin rejects a wrong passwordBoth branches of if (pwd == stored) run

COCOMO II estimate for 200 KLOC

COCOMO II (post-architecture model) estimates effort as:

PM = A × Size^E × ∏EM

  • A = 2.94 (calibration constant), Size in KSLOC
  • E = B + 0.01 × ΣSF, with B = 0.91; SF are the five scale factors: precedentedness (PREC), development flexibility (FLEX), architecture/risk resolution (RESL), team cohesion (TEAM) and process maturity (PMAT)
  • EM are 17 effort multipliers (product, platform, personnel, project)

Schedule: TDEV = C × PM^F, with C = 3.67 and F = D + 0.2 × (E − B), D = 0.28.

Assumptions: size = 200 KSLOC; all scale factors at their nominal ratings (PREC 3.72, FLEX 3.04, RESL 4.24, TEAM 3.29, PMAT 4.68); all effort multipliers nominal (= 1.0), so ∏EM = 1.

Step 1: Exponent ΣSF = 3.72 + 3.04 + 4.24 + 3.29 + 4.68 = 18.97 E = 0.91 + 0.01 × 18.97 = 1.0997

Step 2: Effort 200^1.0997 = 339.19 PM = 2.94 × 339.19 × 1 = 997.2 person-months

Step 3: Development time F = 0.28 + 0.2 × (1.0997 − 0.91) = 0.3179 997.2^0.3179 = 8.983 TDEV = 3.67 × 8.983 = 33.0 months

Step 4: Average staffing Staff = PM / TDEV = 997.2 / 32.97 = 30.2 ≈ 30 persons

Step 5: Productivity P = Size / PM = 200,000 / 997.2 = 200.6 LOC per person-month (≈ 0.2 KLOC/PM)

QuantityResult
Effort≈ 997 person-months
Development time≈ 33 months
Average staffing≈ 30 persons
Productivity≈ 201 LOC/PM

Cross-check with basic COCOMO: 200 KLOC is above the usual organic range, so semi-detached mode (a = 3.0, b = 1.12, c = 2.5, d = 0.35) is suitable. It gives E = 3.0 × 200^1.12 = 1133.1 PM, D = 2.5 × 1133.1^0.35 = 29.3 months, about 39 persons and 176.5 LOC/PM, which is close to the COCOMO II result.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Software Engineering chapter 8 questions →