Conveyor Belt Unit Testplan

EventHelix.com/EventStudio 2.0
Generated on 05-Jul-03 11:23

Code Reviewed By:

Unit Tested By:

Package Routed Successfully - input_conveyor_belt

Legs Taken:

Test Procedures:

NumActionResultStatus
1.Create object input_conveyor_belt
  1. Check if object input_conveyor_belt data-structures and objects have been initialized correctly
  2. input_conveyor_belt should change state to "Idle"

CR:

UT:

2.Send SENSOR_INTERRUPT to input_conveyor_belt (Message from conveyor_belt_manager) with parameters conveyor_belt_id
  1. SENSOR_INTERRUPT message handler should be called
  2. input_conveyor_belt should send ReadSensor to input_magnetic_sensor
  3. input_conveyor_belt should create object package
  4. input_conveyor_belt should send SetInputConveyorBeltId to package with fields conveyor_belt_id
  5. input_conveyor_belt should send SetProductInfo to package with fields product_info
  6. input_conveyor_belt should send GetRouting to routing_table with fields package
  7. input_conveyor_belt should send SetOutputConveyorBeltId to package with fields output_conveyor_belt_id
  8. input_conveyor_belt should start timer await_package_routing
  9. input_conveyor_belt should change state to "Awaiting Package Routing"

CR:

UT:

3.Send AcknowledgePackage to input_conveyor_belt (Message from output_conveyor_belt) with parameters input_belt
  1. AcknowledgePackage message handler should be called
  2. input_conveyor_belt should stop timer await_package_routing
  3. input_conveyor_belt should change state to "Idle"
  4. input_conveyor_belt should delete object package

CR:

UT:

Package Routed Successfully - output_conveyor_belt

Legs Taken:

Test Procedures:

NumActionResultStatus
1.Create object output_conveyor_belt
  1. Check if object output_conveyor_belt data-structures and objects have been initialized correctly
  2. output_conveyor_belt should change state to "Idle"

CR:

UT:

2.Send SENSOR_INTERRUPT to output_conveyor_belt (Message from conveyor_belt_manager) with parameters conveyor_belt_id
  1. SENSOR_INTERRUPT message handler should be called
  2. output_conveyor_belt should send ReadSensor to output_magnetic_sensor
  3. output_conveyor_belt should send GetReverseRouting to routing_table with fields product_info
  4. output_conveyor_belt should send AcknowledgePackage to input_conveyor_belt with fields input_belt

CR:

UT:

Conveyor Belt Jammed - input_conveyor_belt

Legs Taken:

Test Procedures:

NumActionResultStatus
1.Create object input_conveyor_belt
  1. Check if object input_conveyor_belt data-structures and objects have been initialized correctly
  2. input_conveyor_belt should change state to "Idle"

CR:

UT:

2.Send SENSOR_INTERRUPT to input_conveyor_belt (Message from conveyor_belt_manager) with parameters conveyor_belt_id
  1. SENSOR_INTERRUPT message handler should be called
  2. input_conveyor_belt should send ReadSensor to input_magnetic_sensor
  3. input_conveyor_belt should create object package
  4. input_conveyor_belt should send SetInputConveyorBeltId to package with fields conveyor_belt_id
  5. input_conveyor_belt should send SetProductInfo to package with fields product_info
  6. input_conveyor_belt should send GetRouting to routing_table with fields package
  7. input_conveyor_belt should send SetOutputConveyorBeltId to package with fields output_conveyor_belt_id
  8. input_conveyor_belt should start timer await_package_routing
  9. input_conveyor_belt should change state to "Awaiting Package Routing"

CR:

UT:

3.Send timeout await_package_routing to input_conveyor_belt
  1. await_package_routing timeout handler should be called
  2. input_conveyor_belt should delete object package
  3. input_conveyor_belt should change state to "Jammed"
  4. input_conveyor_belt should send CONVEYOR_BELT_JAMMED_ALARM to operator with fields raise, belt_id

CR:

UT:

Conveyor Belt Jammed - output_conveyor_belt

Legs Taken:

Test Procedures:

NumActionResultStatus
1.Create object output_conveyor_belt
  1. Check if object output_conveyor_belt data-structures and objects have been initialized correctly
  2. output_conveyor_belt should change state to "Idle"

CR:

UT:

Creating and Deleting a Conveyor Belt

Test Procedures:

NumActionResultStatus
1.Create object conveyor_belt (Created by conveyor_belt_manager)
  1. Check if object conveyor_belt has been initialized correctly
  2. conveyor_belt should change state to "Out of Service"

CR:

UT:

2.Send ConfigureBelt to conveyor_belt (Message from conveyor_belt_manager) with parameters belt_id, belt_type
  1. ConfigureBelt message handler should be called
  2. conveyor_belt should create object magnetic_sensor
  3. conveyor_belt should send Activate to magnetic_sensor
  4. conveyor_belt should change state to "Idle"

CR:

UT:

3.Send UnConfigureBelt to conveyor_belt (Message from conveyor_belt_manager) with parameters belt_id, belt_type
  1. UnConfigureBelt message handler should be called
  2. conveyor_belt should send Deactivate to magnetic_sensor
  3. conveyor_belt should delete object magnetic_sensor

CR:

UT:

4.Delete object conveyor_belt (Deleted by conveyor_belt_manager)
  1. Verify that object conveyor_belt has released all resources

CR:

UT: