Test-driven development.
Development testing and Test-driven development (TDD) are both software testing approaches, but
they differ in their fundamental processes and when they are applied during development:
Development testing:
• Occurs after code has been written
• Involves testing individual components or units of code
• Aims to find and fix bugs in the existing code
• Typically includes unit testing, component testing, and system testing
Test-driven development (TDD):
• Occurs before code is written
• Involves writing tests first, then writing code to pass those tests
• Aims to ensure code meets requirements from the start
• Follows a cycle of: write a test, run the test (it should fail), write code to pass the test, run
the test again (it should pass), then refactor if needed
The key difference is that development testing is reactive (testing existing code), while TDD is
proactive (defining expected behavior before writing code).
Question 2 What are the strategic options for legacy system evolution?
When would you normally replace all or part of a system rather than
continue maintenance of the software?
Strategic options for legacy system evolution:
1. Maintenance: Continue to maintain and update the existing system
2. Architectural migration: Keep functionality but move to a new platform
3. System re-engineering: Restructure and redocument the system
4. Replacement: Develop a new system to replace the legacy system
You would normally replace all or part of a system rather than continue maintenance when:
1. The system is no longer cost-effective to maintain
2. The technology is obsolete and no longer supported
3. The system can't meet new business requirements
4. The system's performance is inadequate for current needs
5. The risk of system failure is too high due to degraded structure
Question 3 [12 marks] Name six reasons why software dependability is important in most
sociotechnical systems. Add an example to each reason.
1. You avoid the introduction of accidental errors into the system during software specification
and development.
2. You design verification and validation processes that are effective in discovering residual
errors that affect the dependability of the system.
3. You design the system to be fault tolerant so that it can continue working when things go
wrong.