Testing and Documentation Procedures

Testing and Documentation Procedures

Testing in Object-Oriented Development

Unit Testing

  • Unit testing involves testing individual components of a software, such as functions or methods, in isolation.
  • It is often automated, and performed regularly during development to catch issues early.
  • Mock objects are often used to simulate the behaviour of complex real objects during unit testing.

Integration Testing

  • Integration testing focuses on testing the interaction between different parts of the software.
  • This can reveal issues with data sharing and communication between components.
  • It often involves creating test cases that cover multiple units.

System Testing

  • System testing assesses the system as a whole.
  • This can test the system’s behaviour under different operating conditions, or verify that it meets specified requirements.
  • It should be comprehensive, covering all features and considering different user paths.

Test-Driven Development

  • Test-driven development (TDD) is a development approach where tests are written before the code.
  • The cycle of TDD is: write a test, write the minimum amount of code to pass the test, then refactor to improve the code.

Documentation Procedures for Object-Oriented Development

Commenting

  • Code comments are used to explain what specific parts of the code do.
  • They serve to make the code easier to understand and maintain.
  • Comments should be concise yet comprehensive, and up-to-date with the latest code changes.

Code Documentation

  • Code documentation provides a detailed description of how a software or its components function.
  • This can include class diagrams, data flow diagrams, and sequence diagrams to visualise software structure and behaviour.
  • Code documentation can be generated automatically from the code and its comments.

User Manuals

  • User manuals are designed to assist end users in using the software correctly.
  • They should provide clear instructions on installation, functionality, and troubleshooting.
  • User manuals often need to be translated into different languages to suit international users.

Maintenance Manuals

  • Maintenance manuals are intended for developers who will maintain and modify the software in the future.
  • These manuals include detailed instructions on system architecture, code structure, testing procedures, and troubleshooting tips.
  • The better the maintenance manual, the easier it’s for future developers to understand and work on the system.