Implementation and Deployment Activities
Testing Concepts
Testing – the process of examining a component, subsystem, or system to determine its operational
characteristics and whether it contains any defects
Test case – a formal description of a starting state, one or more events to which the software must
respond, and the expected response or ending state
Defined based on well understood functional and non-functional requirements
Must test all normal and exception situations
Test data – a set of starting states and events used to test a module, group of modules, or entire
system
The data that will be used for a test case
Most common types of tests
, Unit Testing
Unit test – tests of an individual method, class, or component before it is integrated with other
software
Driver – a method or class developed for unit testing that simulates the behavior of a method that
sends a message to the method being tested
Stub – a method or class developed for unit testing that simulates the behavior of a method invoked
that hasn’t yet been written
Driver and stub components
Integration Testing
Integration test – tests of the behavior of a group of methods, classes, or components
Interface incompatibility - For example, one method passes a parameter of the wrong data
type to another method
Parameter values - method is passed or returns a value that was unexpected, such as negative
number for a price.
Run-time exceptions - A method generates an error, such as “out of memory” or “file already in
use,” due to conflicting resource needs
Unexpected state interactions - The states of two or more objects interact to cause complex
failures, as when an OnlineCart class method operates correctly for all possible Customer object
states except one
Integration testing of object-oriented software is very complex because an object-oriented program
consists of a set of interacting objects
Methods can be called by many other methods, and the calling methods may be distributed across
many classes
Classes may inherit methods and state variables from other classes
Specific method to be called is dynamically determined at run time based on number and type of
parameters
Objects can retain internal variable values (i.e., the object state) between calls. The response to
two identical calls may be different due to state changes that result from the first call or occur
between calls
Required Procedures
Build and unit test the components to be integrated
Create test data – comprehensive test data, must be coordinated between developers
Conduct the integration test – Assign resources and responsibilities. Plan frequency and
procedures
Evaluate the test results – Identify valid and invalid responses
Log the test results – Log valid test runs. Also log errors