Software Development Methods: Testing, Agile, and Plan-Driven Approaches

SequenceDiagram

Testing

Development Testing: The system is tested during development to discover bugs and defects. System designers and programmers are likely to be involved in the testing process.

Release Testing: A separate testing team tests a complete version of the system before it is released to the users. The goal is to check that the system meets the requirements of stakeholders.

User Testing: Users test the system in their own environment. Acceptance testing is one type of user testing where the customer formally tests a system to decide if further development is needed.

Inspection: Mostly focused on the source code of the system.

During testing, errors can hide other errors. Because inspection is a static process, you don’t have to be concerned with interactions between errors.

Incomplete versions of a system can be inspected without additional costs. The system development costs won’t increase just to test the parts that are available and not incomplete.

An inspection can not only check for program defects but also for things such as standards, portability, and maintainability.

Test-Driven Development

  1. You start by identifying the increment of functionality that is required.
  2. You write a test for this functionality and implement this as an automated test. This means that the test can be executed and will report whether or not it has passed or failed.
  3. You then run the test or tests. Initially, you have not implemented the functionality, so the new test will fail. This is deliberate as it shows that the test adds something to the test set.
  4. You then implement the functionality and re-run the test. This may involve refactoring existing code to improve it and add new code to what’s already there.
  5. Once all tests run successfully, you move on to implementing the next chunk of functionality.

Advantages of Test-Driven Development

  1. Code Coverage: Code is tested as it is written, so defects are discovered early in the development process.
  2. Regression Testing: A test suite is developed incrementally as a program is developed. You can always run regression tests to check that changes to the program have not introduced new bugs.
  3. System Documentation: The tests themselves act as a form of documentation that describes what the code should be doing. Reading the tests can make it easier to understand the code.

Disadvantages of Test-Driven Development

Test-driven development is used in new software development where functionality is either implemented in new code or by using well-tested standard libraries. If reusing large code components, then you need to write tests for these systems as a whole. Test-driven development may also be ineffective with multi-threaded systems. The different threads may be interleaved at different times in different test runs, and so may produce different results.

Agile Development

Agile methods are incremental development methods that focus on rapid development, frequent releases of the software, reducing process overheads, and producing high-quality code. They involve the customer directly in the development process.

Customer Involvement: Customers should be closely involved throughout the development process. Their role is to provide and prioritize new system requirements and to evaluate the iterations of the system. Its success depends on having a customer who is willing and able to spend time with the development team and who can represent all system stakeholders.

Incremental Delivery: The software is developed in increments, with the customer specifying the requirements to be included in each increment. Individual team members may not have suitable personalities for the intense involvement.

People, Not Process: The skills of the development team should be recognized and exploited. Team members should be left to develop their own ways of working without prescriptive processes.

Embrace Change: Expect the system requirements to change, and so design the system to accommodate these changes. Each stakeholder gives different priorities to different changes.

Maintain Simplicity: Focus on simplicity in both the software being developed and in the development process. Wherever possible, actively work to eliminate complexity from the system.

Plan-Driven Development

Iteration occurs within activities, with formal documents used to communicate between stages of the process. The requirements and the design are developed together, rather than separately. The decision on whether to use an agile or a plan-driven approach to development should depend on the type of software being developed, the capabilities of the development team, and the culture of the company developing the system.