50 likes | 138 Views
BASIS PATH TESTING EXAMPLE :VIDEO SALES. For the video sales and rental shop example, consider the following procedure for reserving a copy of a movie video. Procedure: reserveVideoCopy return(result) 1. If (status = “available”) OR ((status = “rented”) AND (returnDate ≤
E N D
BASIS PATH TESTING EXAMPLE:VIDEO SALES For the video sales and rental shop example, consider the following procedure for reserving a copy of a movie video. Procedure: reserveVideoCopy return(result) 1. If (status = “available”) OR ((status = “rented”) AND (returnDate ≤ requestDate)) 2. status = “reserved” 3. link video copy instance to member instance 4. result = “success” 5. Else 6. result = “failure” 7. Endif End Draw the flow graph for the reserveVideoCopy procedure. Show the flow graph node to program statement mapping and clearly label the regions of the flow graph.
BASIS PATH TESTING EXAMPLE: COMMON ERRORS • Missing the outside region • Missing including a node for the last statement • Having a condition with only one out-going branch • Drawing an activity diagram • Drawing a state machine diagram • Not understanding what is a flow graph