Pages

Wednesday, September 8, 2010

Software Testing Strategies used in Online Fresh Food Store

Unit Testing
It focuses on the smallest unit of software design - the software component or module. Using the component level design description as a guide, important control paths are tested to uncover errors within the boundary of the module. The relative complexity of tests and uncovered errors is limited by the constrained scope established for unit testing. The unit test is white-box oriented, and the step can be conducted in parallel for multiple components. The tests that occur as part of unit tests are listed below:
  • Module Interface is tested to ensure that information properly flows into and out of the program unit under test. Tests of data flow across a module interface are required before any other test is initiated. If data does not enter and exit properly, all other tests are moot.
  • Local Data Structures are examined to ensure that data stored temporarily maintains its integrity during all steps in an algorithm's execution. 
  • Boundary Conditions are tested to ensure that the module operates properly at boundaries established to limit or restrict processing. 
  • Independent Paths are exercised to ensure that all statements in a module have been executed at least once. 
  • Error Handling Paths are also tested.
Selective testing of execution paths is an essential task during the unit test. Basis path and loop testing are effective techniques for uncovering a broad array of path errors. Among the more common errors in computation are
  • misunderstood or incorrect arithmetic precedence,
  • mixed mode operations 
  • incorrect initialization 
  • precision inaccuracy 
  • incorrect symbolic representation of an expression.
Comparison and control flow are closely coupled to one another (i.e., change of flow frequently occurs after a comparison). Test cases should uncover errors such as
  • comparison of different data types
  • incorrect logical operators or precedence 
  • expectation of equality when precision error makes equality unlikely 
  • incorrect comparison of variables 
  • improper or nonexistent loop termination
  • failure to exit when divergent iteration is encountered 
  • improperly modified loop variables
Integration Testing

After the testing of each module separately, all of them are tested jointly to check how a data flows from one module to another module. Because this data flow may give uncovered errors that have not been covered in the unit testing. And so they are checked with full compilation. The objective is to take unit tested components and build a program structure that has been dictated by design. Integration testing is a systematic technique for constructing the program structure while at the same time conducting tests to uncover errors associated with interfacing.