Warehouse Manager Use Cases and JMeter Tests Implementation

Ashish VijaywargiyaPublished: Updated:

In our last blog post on Order Manager Use Cases in an E-commerce solution, we covered some of the basic roles and responsibilities of a Order Manager in an ecommerce system. This article continues the discussion, focusing on Apache OFBiz Warehouse Manager Use Cases and JMeter Tests implementation.

A Warehouse Manager is involved in many activities such as ensuring that orders are routed to the correct warehouse, as well as planning, coordinating, and monitoring the receipt, order assembly and dispatch of finished goods inventory. Here we showcase three main use cases; one is Quick Ship of Approved Orders, two is manual Pick and Pack of an order, and three is is Receiving inventory in the warehouse after inspection.

1) Quick Ship Approved Orders

Use Case NameQuick Ship Approved Orders
ActorWarehouse Manager
DescriptionWarehouse manager fulfills approved orders using “Quick Ship Entire Order” option.
Normal Path1) Login into order manager
2) Find Approved order
3) Select order and go to Order View page
4) Fulfil order using Quickship option.
Alternative PathPlease see below mentioned use case #2 for alternate method.

Figure (a): Use case diagram for OFBiz Warehouse Manager (Quick Ship Approved Orders)

Warehouse Manager Use Cases and JMeter Tests Implementation

2. Order Fulfilment Using manual Pick Pack Process

Use case nameOrder fulfilment using Picking-Packing process
ActorWarehouse Manager, Picker and Packer
DescriptionWarehouse manager creates picklists for approved orders, picker picks the order items, packer packs and ships the order.
Normal Path1) Login into Facility Manager
2) Group orders by shipping method, warehouse area or number of order items
3) Create Picklist
4) Pick the Picklist items
5) Pack the picked item
6) Complete shipment
Alternative pathFor alternate method, please refer use case #1.

Figure (b): Use case diagram for OFBiz Warehouse Manager (Order fulfilment using manual Pick Pack process)

HotWax Warehouse Pick Pack

3. Receive Inventory

Use Case NameReceive inventory
ActorWarehouse Manager
DescriptionThe Facility manager receives product inventory into the warehouse
Normal Path1) Login into Facility Manager
2) Select product to receive
3) Receive desired quantity
Alternative PathN/A

 Figure (c): Use case diagram for OFBiz Warehouse Manager (Receive Inventory)

HotWax-Media-Warehouse Management Receive Inventory

Now let’s discuss test implementation details for the following scenarios:

— Quick Ship Approved Orders
— Order Fulfilment – Picking
— Order Fulfilment – Packing and shipping
— Receive Inventory

1) Quick Ship Approved Orders

Step 1: Add User Defined Variables, HTTP Cookie Manager and HTTP Request Defaults configuration elements inside Quick Ship Approved Orders thread group.

Step 2: Add HTTP request sampler with path /ordermgr/control/login to login to the back-end application of warehouse manager. Minimum required data to be posted with this request is as below:

Parameter NameValue of Parameter
USERNAMEadmin
PASSWORDofbiz

Step 3: Add while controller with infinite looping using “true” condition as warehouse manager has to work continuously to ship all the approved orders.

Step 4:
In while loop, add HTTP request sampler with the path /ordermgr/control/orderlist to display list of orders currently has been created and ready to ship. Minimum data that should be posted with this request is as follows:

Parameter NameValue of Parameter
changeStatusAndTypeStateY
viewapprovedY
view_SALES_ORDERY

Step 5: Add regular expression extractor to extract the orderId value from the rendered page.

Step 6: Add if controller with the condition “${orderId}”!=”NA” for restricting further operations if no any orderId has been found in previous step.

Step 7: Inside if controller, add HTTP request sampler with path /ordermgr/control/orderview to go to order view page of particular order whose orderId is there in orderId variable. Minimum data to be posted with this request is as below:

Parameter NameValue of Parameter
orderId${orderId} (Dynamically from the extracted data)

Step 8: Add HTTP request sampler with path /ordermgr/control/quickShipOrder to quick ship the order whose orderId is there in the orderId variable. Minimum data to be posted with this request is as below:

Parameter NameValue of Parameter
orderId${orderId} (Dynamically from the extracted data)

The structure of the load testing script after adding quick ship script will look like as shown below:

Quick Ship Order
2) Order Fulfilment – Picking

Following are the steps used when designing load testing script for Picking process:

Step 1: Add User Defined Variables, HTTP Cookie Manager and HTTP Request Defaults configuration elements inside Picking thread group.

Step 2: Add HTTP request sampler with path /facility/control/login for logging in to the facility application. Minimum data to be posted with the request is as below:

Parameter NameValue of Parameter
USERNAMEadmin
PASSWORDofbiz

Step 3: Add while controller with infinite looping using “true” condition as picking process is continuous process.

Step 4: Add HTTP request sampler with path /facility/control/PicklistOptions to go to picklist options page. Minimum required data to be posted with this request is shown below:

Parameter NameValue of Parameter
facilityIdWebStoreWarehouse
${pickingMethod} (This will come dynamically from BeanShell Script explained in next step)Y

Step 5: Add one BeanShell PreProcessor to decide which picking method to use randomly from the three different methods. The BeanShell Script for that purpose is as follows:

Step 6: Add CSS/JQuery extractor to extract the value of the orderId list which we need to pass in parameters for creating the picklist of same. It can be added as shown in picture below:

CSS JQuery Extractor

Step 7: Add HTTP request sampler with path /facility/control/createPicklistFromOrders to create picklist. Minimum required parameters to be passed with this request are as below:

Parameter NameValue of Parameter
facilityIdWebStoreWarehouse
${pickingMethod}Y
maxNumberOfOrders10

Step 8: Add one BeanShell PreProcessor script inside the above request for adding orderId list as a parameter to the request in step#7. The BeanShell Script should be added as shown in picture below:

OrderList BeanShell

After adding this script, the structure of the script will look like this:

Warehouse Picking

3) Order Fulfillment – Packing and Shipping:

Following are the steps used when designing load testing script for Packing and shipping the order:
Step 1: Add User Defined Variables, HTTP Cookie Manager and HTTP Request Defaults configuration elements inside Packing & Shipping thread group.

Step 2: Add JDBC Connection Configuration element also as this script requires JDBC connection. The settings to be done as shown in picture below:

Warehouse JDBC

Step 3: Add HTTP request sampler with path /facility/control/login to login to the facility application. Post Username and password as like in step#2 of Picking.

Step 4: Add while controller with infinite looping as like step#3 in Picking.

Step 5: Add HTTP request sampler with path /facility/control/PicklistManage?facilityId=WebStoreWarehouse to go to manage picklist page. Add regular expression extractor inside this to extract the value of picklistId which are rendered on the screen.

Step 6: Add JDBC request sampler after this to fetch primaryOrderId corresponding to the extracted picklistId. The settings to be done as shown in picture below:

JDBC Request

Step 7: To find number of loop iterations to be done to pack all orders in the bin, we have to write one BeanShell PostProcessor script inside above step which will extract number of orders in particular bin.The script is as follows:

Step 8: Add one loop controller with the loop count of number of orders in the bin which we have calculated in BeanShell script above.Step 9: Add HTTP request sampler with path /facility/control/PackOrder to go to pack order page with minimum parameters to be passed as below:

Parameter NameValue of Parameter
facilityIdWebStoreWarehouse
orderId${primaryOrderId} (This will come dynamically from BeanShell script explained in next step)

Step 10: Write BeanShell PreProcessor script inside above step to extract primaryOrderId value inside known picklist bin. The script for that is as given below:

Step 11: Add some regular expression extractors to extract productId, quantity, ItemSeqId, packageSeq, orderId and shipGroupSeqId rendered on the screen in step#9. These variables are required in further steps.Step 12: Add HTTP request sampler with path /facility/control/ProcessBulkPackOrder to process the packing of order. The minimum parameters required to post with this request are as below:

Parameter NameValue of Parameter
orderId${orderId}
shipGroupSeqId${shipGroupSeqId}
facilityIdWebStoreWarehouse
originFacilityIdWebStoreWarehouse
hideGridN

Step 13: We have to write one BeanShell script to add prefix and postfix values to the parameter to be submitted. These are required because one order can contain different products added into it. To differentiate them, parameter name should be unique. So prefix and postfix are added to it. Script for adding that is as below:

Step 14: Add some regular expression extractors to extract the values of shippingContactMechId, shipmentMethodTypeId, carrierPartyId, productStoreId and carrierRoleTypeId from the screen rendered in step#12.Step 15: Add HTTP request sampler with path /facility/control/CompletePack to complete the packaging of the order. Minimum required parameters to be passed with this request are as follows:

Parameter NameValue of Parameter
orderId${orderId}
shipGroupSeqId${shipGroupSeqId}
facilityIdWebStoreWarehouse
forceCompleteN
weightUomIdWT_lb
showInputN
shippingContactMechId${shippingContactMechId}
shipmentMethodTypeId${shipmentMethodTypeId}
carrierPartyId${carrierPartyId}
carrierRoleTypeId${carrierRoleTypeId}
productStoreId${productStoreId}

Step 16: Now picklist which is packed in the last steps, we should mark that picked. But to provide some check before marking any picklist as picked we add one if controller with condition “${NO_OF_ORDERS}” > “0” to check that number of orders which we found in step#7 are non zero. If non zero number of orders are found then go for marking picklist as picked.

Step 17: Add HTTP request sampler with path /facility/control/updatePicklist to update picklist status as picked. Minimum data to be posted with this request is as below:

Parameter NameValue of Parameter
facilityIdWebStoreWarehouse
picklistId${picklistId}
statusIdPICKLIST_PICKED

Add one BeanShell PostProcessor in this request to make NO_OF_ORDERS variable 0. After adding this script, structure of our script will look like picture below:

Picking and Shipping

4) Receive Inventory:

This section presents a step-by-step guide to create a load testing script for loading inventory.

Step 1: Add HTTP request defaults and HTTP Cookie Manager Configuration elements.

Step 2: Add HTTP request sampler with path /facility/control/main to go to main page for login into facility application. Post data ad stated in step#2 of Order fulfillment – Picking.

Step 3: Add one loop controller to control the number of times data to be loaded. For now we should make loop count as 1.

Step 4: Add CSV Data Set Config element inside the loop which contains two columns; one for productId whose inventory to be loaded and another is quantity of product to be added to inventory.

Step 5: Add HTTP request sampler with path /facility/control/ReceiveInventory?facilityId=WebStoreWarehouse to go to receive inventory page.

Step 6: Add HTTP request sampler with path /facility/control/ReceiveInventory to receive inventory form filling. We should post following minimum data with this request:

Parameter NameValue of Parameter
facilityIdWebStoreWarehouse
productId${productId} (This will be fetched automatically from CSV file)

Step 7: Add BeanShell PreProcessor inside above request to randomly calculate locationSeqId for the inventory. The BeanShell script is as follows:

Step 8: Add HTTP request sampler with path /facility/control/receiveSingleInventoryProduct to receive and store the inventory. Minimum parameters to be posted with this request are as below:

Parameter NameValue of Parameter
facilityIdWebStoreWarehouse
productId${productId}
ownerPartyIdCompany
inventoryItemTypeIdNON_SERIAL_INV_ITEM
quantityRejected0
locationSeqId${locationSeqId}
quantityAccepted${quantity}

There are other two parameters named unitCost and datetimeReceived whose values can be, for example, 10 and 2014-08-20 10:59:56.785 respectively. After adding this script, the structure of script will look like in picture below:
Receive Inventory

Implemented script sample for the Order Manager use case:

Please have a look at the Implemented scripts for the use case. You simply need to download this script, review it, and execute it.

  1. git clone https://github.com/ofbizecosystem/evolvingofbiz-loadtest.git
  2. Apply patches on OFbiz-13.07 branch code base from patches directory
  3. Load data from xml data files of data directory
  4. Open .jmx file for ordermgr use cases in Jmeter GUI
  5. Modify script to set HOST and PORT related entries

Apache OFBiz helps retailers manage their warehouse and fulfillment needs flexibly, in ways that match their business processes. Whether using a complete warehouse management solution or just connecting to an existing warehouse management system (WMS), a good warehouse management strategy helps retailers streamline product management, inventory management, order management, and fulfillment, helping them improve delivery time, reduce costs, and create happy customers.

This information on JMeter can be used to to review and better understand Warehouse Management with an Apache OFBiz ecommerce ERP platform. Please contact us if you would like to know more about testing various parameters for OFBiz’s Warehouse Manager, or about anything else OFBiz!

Thanks for your time!

Ashish Vijaywargiya About Ashish Vijaywargiya
Ashish began his career as a Software Engineer with Aditisoft Solutions & Consulting Services Pvt. Ltd. (now HotWax Media Pvt. Ltd.) in 2003, and is now Vice President of Operations. Ashish is the local manager of offshore development efforts for HotWax Media. With an emphasis on providing training both to internal HotWax Media employees as well as to clients, Ashish has worked on a variety of projects for clients in North America, Europe and India. He continues to be dedicated to the Apache OFBiz open source project since 2003 and became committer in 2007. He is also a member of Project Management Committee for Apache OFBiz project. Ashish graduated in 2003 from RGPV University, Bhopal (M.P) India, with a Bachelor of Engineering(B.E) degree in Computer Science.

Leave a Reply

Your email address will not be published. Required fields are marked *