Difference between revisions of "Open Requirements Tests"

From Opentaps Wiki
Jump to navigationJump to search
(New page: These tests will verify that open requirements are correctly handled. '''Action''' Create an order for the product PROD_COST for the default ecommerce store. Run MRP by going to Purchas...)
 
(Minimum Stock Requirement Tests)
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
These tests will verify that open requirements are correctly handled.
+
These tests will verify that requirements are correctly created when orders are approved.  These tests will use product GZ-1005 which is configured to use requirement method PRODRQM_AUTO by default, which creates requirements for every order.  We will also be testing PRODRQM_ATP, which creates requirements when the stock goes below minimum quantity specified in ProductFacility.  
  
 +
==Auto Requirement Tests==
  
 +
As a setup step, go into catalog manager and ensure GZ-1005 has requirement method auto for every order PRODRQM_AUTO.
 +
 +
===Test 1: Auto requirement not created when order is first created===
 +
'''Action'''
 +
 +
Create an order for the product GZ-1005 for DemoAccount1, using "Offline Payment" and the default ecommerce store.
 +
 +
'''Result'''
 +
 +
No requirements are created when the order is first created.
 +
 +
===Test 2: Auto requirement not created when order is approved===
 
'''Action'''
 
'''Action'''
  
Create an order for the product PROD_COST for the default ecommerce store.
+
Approve your Order
Run MRP by going to Purchasing > Planning >> Run MRP.  Select "WebStoreWarehouse" and run the MRP service.
 
Then go to Purchasing > Planning >> Open Requirements.  Put in "PROD_COST" in the productId field.
 
  
 
'''Result'''
 
'''Result'''
  
You should see requirements for PROD_COST, MAT_A_COST, MAT_B_COST show up.
+
A requirement is created for GZ-1005.
 +
 
 +
===Test 3: Auto requirement can be seen in Open Requirements screen===
 +
'''Action'''
 +
 
 +
Go to Purchasing > Planning >> Open Requirements. 
  
 +
'''Results'''
 +
 +
You should see your new Requirement there.
 +
 +
===Test 4: Changing Order from Hold to Approved does not create more Requirements===
  
 
'''Action'''
 
'''Action'''
  
Now put in MAT_A_COST
+
Change your order status to Hold.  Now change it back to Approved.
  
'''Result'''
 
  
Only requirements for MAT_A_COST will show up now.
+
'''Results'''
 +
 
 +
No new requirements are created.
 +
 
 +
==Minimum Stock Requirement Tests==
 +
 
 +
Change the requirement method for GZ-1005 to PRODRQM_ATP (there's another one for PRODRQM_STOCK_ATP which is different).  Find the ProductFacility for GZ-1005 and facility WebStoreWarehouse in webtools.  Create it by hand if it doesn't exist and give it a minimumStock of 10.  Go to warehouse and make sure the ATP is at 15.  Receive inventory until ATP reaches 15 if not.
 +
 
 +
===Test 5:  Minimum stock requirement not created when ATP stays above minimum stock===
 +
 
 +
'''Action'''
 +
 
 +
Create an order for 1 GZ-1005 with a credit card so it gets auto approved.
 +
 
 +
'''Results'''
 +
 
 +
No requirements generated.  Order is approved. ATP for GZ-1005 is now 14.
 +
 
 +
===Test 6:  Minimum stock requirement created when ATP goes below minimum stock===
 +
 
 +
'''Action'''
 +
 
 +
Create an order for 10 GZ-1005 with a credit card so it gets auto approved.
 +
 
 +
'''Results'''
 +
 
 +
ATP of GZ-1005 is now 4.  Requirement created for 6 GZ-1005 (minimum stock is the upper bound for these kinds of requirements).
 +
 
 +
===Test 7:  Minimum stock requirement not created until order is approved===
 +
 
 +
'''Action'''
 +
 
 +
Create another order for 5 GZ-1005, this time with an offline payment so it is not auto approved.
 +
 
 +
'''Results'''
 +
 
 +
No requirements created, ATP is still 4.
 +
 
 +
'''Action'''
 +
 
 +
Approve the order
 +
 
 +
'''Results'''
 +
 
 +
Requirement for 5 GZ-1005 created.  ATP is now -1.
 +
 
 +
===Test 8:  Minimum stock requirement not duplicated when order is put on hold then re approved===
 +
 
 +
'''Action'''
 +
 
 +
Place the order on hold, then approve it again.
 +
 
 +
'''Results'''
 +
 
 +
No new requirements generated, ATP remains the same.

Latest revision as of 18:20, 5 December 2007

These tests will verify that requirements are correctly created when orders are approved. These tests will use product GZ-1005 which is configured to use requirement method PRODRQM_AUTO by default, which creates requirements for every order. We will also be testing PRODRQM_ATP, which creates requirements when the stock goes below minimum quantity specified in ProductFacility.

Auto Requirement Tests

As a setup step, go into catalog manager and ensure GZ-1005 has requirement method auto for every order PRODRQM_AUTO.

Test 1: Auto requirement not created when order is first created

Action

Create an order for the product GZ-1005 for DemoAccount1, using "Offline Payment" and the default ecommerce store.

Result

No requirements are created when the order is first created.

Test 2: Auto requirement not created when order is approved

Action

Approve your Order

Result

A requirement is created for GZ-1005.

Test 3: Auto requirement can be seen in Open Requirements screen

Action

Go to Purchasing > Planning >> Open Requirements.

Results

You should see your new Requirement there.

Test 4: Changing Order from Hold to Approved does not create more Requirements

Action

Change your order status to Hold. Now change it back to Approved.


Results

No new requirements are created.

Minimum Stock Requirement Tests

Change the requirement method for GZ-1005 to PRODRQM_ATP (there's another one for PRODRQM_STOCK_ATP which is different). Find the ProductFacility for GZ-1005 and facility WebStoreWarehouse in webtools. Create it by hand if it doesn't exist and give it a minimumStock of 10. Go to warehouse and make sure the ATP is at 15. Receive inventory until ATP reaches 15 if not.

Test 5: Minimum stock requirement not created when ATP stays above minimum stock

Action

Create an order for 1 GZ-1005 with a credit card so it gets auto approved.

Results

No requirements generated. Order is approved. ATP for GZ-1005 is now 14.

Test 6: Minimum stock requirement created when ATP goes below minimum stock

Action

Create an order for 10 GZ-1005 with a credit card so it gets auto approved.

Results

ATP of GZ-1005 is now 4. Requirement created for 6 GZ-1005 (minimum stock is the upper bound for these kinds of requirements).

Test 7: Minimum stock requirement not created until order is approved

Action

Create another order for 5 GZ-1005, this time with an offline payment so it is not auto approved.

Results

No requirements created, ATP is still 4.

Action

Approve the order

Results

Requirement for 5 GZ-1005 created. ATP is now -1.

Test 8: Minimum stock requirement not duplicated when order is put on hold then re approved

Action

Place the order on hold, then approve it again.

Results

No new requirements generated, ATP remains the same.