+---------+-------------------------------+-------------------------------+
| | Stub | Driver |
+---------+-------------------------------+-------------------------------+
| Type | Dummy codes | Dummy codes |
+---------+-------------------------------+-------------------------------+
| Used in | Top Down Integration | Bottom Up Integration |
+---------+-------------------------------+-------------------------------+
| Purpose | To allow testing of the upper | To allow testing of the lower |
| | levels of the code, when the | levels of the code, when the |
| | lower levels of the code are | upper levels of the code are |
| | not yet developed. | not yet developed. |
+---------+-------------------------------+-------------------------------+
| Example | A and B are components. | A and B are components. |
| | A ---> B | A ---> B |
| | | |
| | A has been developed. | A still needs to be developed.|
| | B still needs to be developed.| B has been developed. |
| | Therefore, stub is used | Therefore, driver is used |
| | in place of B to imitate it. | in place of A to imitate it |
| | | |
| | A ---> Stub | Driver ---> B |
+---------+-------------------------------+-------------------------------+