Module Testing

Bread Crumbs: Home - SW_Dev_Proc - Tst - Modu Tst

Module testing is the testing of complete code objects as produced by the compiler when built from source.

A library may be composed of a single compiled object or several compiled objects. There is only a slight difference between unit testing and module testing. Modules are fully formed chunks of coherent source code that can typically be tested by driving a few function signatures with various stimuli. On the other hand, unit testing (which is considered as part of the implementation phase for this software development process) may involve testing one small part of a function that will never formally implement any function interface.

As a result of modules being more self-contained, module testing will likely require less testing infrastructure such as test harnesses and test stubs. The testing of modules could perhaps even be automated so that they can be included in regression test suites or acceptance test suites.

This page will address the following topics:

Module Test Plans

Module test plans must be created prior to module test execution. The following is a module testing test plan for the microwave oven example.

Module / Component

Test Description

Input Monitoring and Processing Testing

Tests for accuracy in decoding input from keypad and door sensor.  Also tests proper calling of subfunctions based on input from keypad and door sensor.

Clock Testing

Tests for errors in the display of the time on the LCD.  Tests for proper numeric incrementation.

Timer Testing

Tests for accurate timer operation based on inputs received from the keypad.  Checks for errors in decrementing the time displayed on the LCD.  Also tests whether timer is stopped when stop/clear key is pressed.

Auto Cook Presets Testing

Tests for accuracy in determining the proper power level and cooking time to be set depending on which preset key is pressed.

Auto Defrost Testing

Tests for errors in the setting of power levels and defrosting times depending on the food product that is being defrosted.

Cooking Control Testing

Tests for errors in reception of time and power level inputs and checks the accuracy of signals to the oven indicating power levels and cooking duration.  Also tests whether a cooking process stops if a signal interrupt originating from the stop/clear key is received.

Oven Control Testing

Tests for errors in the control of the microwave generator.  Assures proper power settings are used and the generator turns off and on as directed by the cooking control function.

Time Display Testing

Checks for errors in time formatting and output on the LCD.

Power Display Testing

Checks for errors in the display and formatting of power level settings on the LCD.

Beeper Testing

Checks for errors in sound tone and duration given signals to the beeper from control software.


V-Model Diagram

The module test plan creation activity should start as the detailed design artifacts become relatively stable and mature.
V-Model Diagram - Module Testing PNG Refer to the detailed design often during unit-testing to make sure no required features are overlooked. Unit test plans should focus on gaining confidence in algorithm implementation and error-handling. Path coverage is an important consideration as well.

No part of this work should be produced or used without the permission of the authors: Michael Turner and Dr. Sharon A White.