Software Design and Integration Testing
Design: Modules, Interfaces and Integration Testing
- Software design basically dictates how the software is organised into modules.
- A module or a component is a self-contained element of a system.
- Modules interact with each other using well-defined interfaces.
- Interfaces implement a mechanism for passing control and data between modules.
- Integration testing involved testing if the modules that have been put together as per design meet their functionalities and if the interfaces are correct.
Integration Testing
- Begins after unit testing, each module has been unit tested.
- Modules are put together in an incremental, pre-defined manner.
- Integration testing is the testing needed to integrate the modules into a bugger working component.
- Focus is on testing the interfaces.
- This testing is done while the system is being put together, module after module.
- Both software-software integration and software-hardware integration are done.
Interfaces: Types
- Procedure call interface: A procedure/method in one module calls a procedure/method in another module.
- Control and/or data can be passed in both directions.
- Shared memory interface: A block of memory is shared between two modules.
- Data is written to/read from the memory block by the modules. The memory block itself can be created by a third module.
- Message-passing interface: One module prepares a message of a particular type and sends it to another module through this interface.
- Client-server systems and web-based systems use such interfaces.
Interfaces: Errors
- Empirical studies account for up to quarter of all the errors in a system to be interface errors.
- Categories of interface errors:
- Module functionality related: Functionality can be inadequate, could be in a location that wasn’t agreed upon, could have changed, new functionality could have got added.
- Interface related: Interface can be mis-used (wrong parameter type, order or number), can be mis-understood, etc.
- Inadequate error processing by the called and the calling modules.
- Initialisation and other value errors.
- Timing and performance problems, leading to wrong synchronisation, race conditions, etc.