LOADING...

Order Manager Use Cases and JMeter Tests Implementation

In our last blog post covering some of the most important use cases for an e-commerce system, we shared details about some use cases that are fundamental to any ecommerce solution. This article continues that conversation, focusing on Apache OFBiz Order Manager Use Cases and JMeter Tests implementation. The scope of Order Management includes key ecommerce events such as Order Entry, Order Information Management, Quick Shipping, Return Management and more. The following table shows some of the use cases that have been identified for Order Management scenario with Apache OFBiz.

Use case name Order by Order Manager
Actor Order Manager
Description Order manager places a customer sales order from admin application
Normal Path 1) Login into Order Management backend
2) Select customer to place the order
3) Add products to order
4) Select payment and shipping option using Quick Finalize order option
5) Review order
6) Create order
Alternative path The alternate path in an ecommerce solution can be a Anonymous user or a Registered user can create a profile over the front store and can place the order for themselves. Please refer our previous blog post on this use case.

 Figure (a): Use case diagram for Apache OFBiz Order Manager

order management by CSR

Order by Order Manager/CSR:

Please follow the steps mentioned here for building the script for the use case – Order by Order manager.

Step 1: Add HTTP request defaults, CSV Data Config and HTTP Cookie Manager Configuration elements inside Order by CSR or Order Manager thread.

Step 2: Here in CSV Data Config, we should give filename of the CSV file containing all productIds of products which we wish to add in cart.

Step 3: Add HTTP request sampler with path /ordermgr/control/login to login to the order manager application. Minimum data to be posted with this request is:

Parameter Name Value of Parameter
USERNAME admin
PASSWORD ofbiz

Step 4: Add HTTP request sampler with path /ordermgr/control/orderentry to go to order entry page.

Step 5: Add HTTP request sampler with path /ordermgr/control/initorderentry to submit the details about order. Minimum parameters to be posted with this request are as follows:

Parameter Name Value of Parameter
finalizeMode type
orderMode SALES_ORDER
productStoreId 9000
salesChannelEnumId PHONE_SALES_CHANNEL
userLoginId admin
partyId DemoCustomer

Step 6: Add HTTP request sampler with path /ordermgr/control/setOrderCurrencyAgreementShipDates to add information about order currency and other details. Minimum data to be posted with this request is as follows:

Parameter Name Value of Parameter
hasAgreements N
currencyUomId USD
CURRENT_CATALOG_ID DemoCatalog

Step 7: Add HTTP request sampler with path /ordermgr/control/additem to add item into the cart. Minimum data to be posted with this request is as below:

Parameter Name Value of Parameter
add_product_id ${productId} (This will come dynamically from CSV file)
quantity 1

Add a pause after this request.

Step 8: Add HTTP request sampler with path /ordermgr/control/quickcheckout to go to quick checkout page. Add two regular expression extractors into this request to extract shipToCustomerPartyId and shipping_contact_mech_id from the rendered screen.

Step 9: Add HTTP request sampler with path /ordermgr/control/checkout to complete the checkout process. Minimum data to be posted with this request is as follows:

Parameter Name Value of Parameter
checkoutpage quick
BACK_PAGE quickcheckout
shipToCustomerPartyId ${shipToCustomerPartyId}
shipping_contact_mech_id ${shipping_contact_mech_id}
shipping_method NEXT_DAY@UPS
may_split false
is_gift false
checkOutPaymentId EXT_COD

Step 10: Add HTTP request sampler with path /ordermgr/control/processorder to process and confirm the order. After preparing all the script, script structure will look like the picture below:

CSROrders

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 provides an out-of-the-box interface for creating, modifying, suspending and canceling orders. It supports end-to-end creation and management of products, services, and resources, including work orders. OFBiz Order Management uses a standards-driven approach to deliver the core functionality required from a modern Order Management System.

The complete order management process intersects and interacts with other important back office functionality, including warehouse management. In our next blog we will share another use case and accompanying JMeter test plan focusing on OFBiz Warehouse Management.

Does your erp/ecommerce solution have an adequate use case-driven test plan? Does the performance of your solution meet or exceed industry standards? If the answer is “No” or you are unsure, contact us today.

Thanks for your time!


DATE: Sep 15, 2014
AUTHOR: Ashish Vijaywargiya
OFBiz, OFBiz Tutorials,

Leave a Reply

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