Server Unit Test Procedures for HelixStore

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

Code Reviewed By:

Unit Tested By:

Customer Purchases a Product

Test Procedures:

NumActionResultStatus
1.Create object server
  1. Check if object server data-structures and objects have been initialized correctly

CR:

UT:

2.Send order_product to server (Message from customer) with parameters customer, ship_addr, SKU, credit_card
  1. order_product message handler should be called
  2. server should send charge_credit_card to payment_service with fields credit_card, amount

CR:

UT:

3.Send charge_status to server (Message from payment_service) with parameters status = SUCCESS
  1. charge_status message handler should be called
  2. server should take action "Locate the Helix Bin containing the product"
  3. server should send order_product to bin with fields SKU, customer, ship_addr

CR:

UT:

4.Send invoice to server (Message from courier) with parameters invoice_num, SKU, customer, ship_addr, amount
  1. invoice message handler should be called
  2. server should take action "Send e-mail to customer about product shipment"
  3. server should send payment to payment_service with fields invoice_num, amount

CR:

UT:

HelixStore Replenishes Inventory

Test Procedures:

NumActionResultStatus
1.Create object server
  1. Check if object server data-structures and objects have been initialized correctly

CR:

UT:

2.Send inventory_fallen to server (Message from bin) with parameters SKU
  1. inventory_fallen message handler should be called
  2. server should take action "Prepare order for required number of items"
  3. server should send order_items to order_service with fields SKU, quantity, order_number

CR:

UT:

3.Send items_received to server (Message from bin) with parameters order_number, SKU, quantity
  1. items_received message handler should be called
  2. server should take action "Mark the order as completed"
  3. server should send payment to payment_service with fields order_num, amount

CR:

UT:

Adding a New Product to HelixStore

Test Procedures:

NumActionResultStatus
1.Create object server
  1. Check if object server data-structures and objects have been initialized correctly

CR:

UT:

2.Send DefineProduct to server (Message from env_l) with parameters SKU
  1. DefineProduct message handler should be called

CR:

UT:

3.Send SetupBin to server (Message from env_l) with parameters SKU, HelixBin
  1. SetupBin message handler should be called

CR:

UT:

4.Send SetupRouter to server (Message from env_l) with parameters HelixRouter
  1. SetupRouter message handler should be called
  2. server should send product_setup to bin with fields SKU, inventory_thresholds, routing_table

CR:

UT:

5.Send product_setup_ack to server (Message from bin)
  1. product_setup_ack message handler should be called
  2. server should send routing_updates to router with fields HelixBin, conveyor_belt

CR:

UT:

6.Send routing_ack to server (Message from router)
  1. routing_ack message handler should be called
  2. server should send start_operation to bin

CR:

UT:

7.Send inventory_fallen to server (Message from bin) with parameters SKU
  1. inventory_fallen message handler should be called

CR:

UT: