Open Requirements Tests

From Opentaps Wiki

Jump to: navigation, search

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.

Contents

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.



© Open Source Strategies, Inc. Development of this documentation site is sponsored by Open Source Strategies, Inc.
Help support opentaps with a subscription to this documentation site.