- Year not given · 5+3 marks
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.
| Point | Functional testing | Structural testing |
|---|---|---|
| Basis | Requirements/specification | Source code, control flow |
| Code knowledge | Not needed | Needed |
| Techniques | Equivalence partitioning, boundary values, decision tables | Statement, branch, path coverage, basis path |
| Measures | Requirements coverage | Code coverage |
| Finds | Missing functions, interface, performance errors | Logic errors, dead code, wrong conditions |
| Level | System, acceptance | Unit, component |
| Done by | Independent testers, users | Developers |
| Example | Login rejects a wrong password | Both 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)
| Quantity | Result |
|---|---|
| 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)
Related questions
- COCOMO for 49,200 lines of code · Software Engineering, chapter 8
- Why software development is complex; man-month myth · Software Engineering, chapter 1
- Alpha versus beta testing · Software Engineering, chapter 8
- Impounded reservoir, 6202 million L per month · Water Supply Engineering, chapter 2 · asked 2×
- Impounded reservoir, 9688 million L per month · Water Supply Engineering, chapter 2 · asked 2×
- Find X from cash flow diagram, 1% per month · Engineering Economics, chapter 2
- Software testing time paradox · Instrumentation II, chapter 9