Order Manager Use Cases and JMeter Tests Implementation

Ashish VijaywargiyaPublished: Updated:

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 nameOrder by Order Manager
ActorOrder Manager
DescriptionOrder manager places a customer sales order from admin application
Normal Path1) 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 pathThe 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 NameValue of Parameter
USERNAMEadmin
PASSWORDofbiz

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 NameValue of Parameter
finalizeModetype
orderModeSALES_ORDER
productStoreId9000
salesChannelEnumIdPHONE_SALES_CHANNEL
userLoginIdadmin
partyIdDemoCustomer

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 NameValue of Parameter
hasAgreementsN
currencyUomIdUSD
CURRENT_CATALOG_IDDemoCatalog

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 NameValue of Parameter
add_product_id${productId} (This will come dynamically from CSV file)
quantity1

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 NameValue of Parameter
checkoutpagequick
BACK_PAGEquickcheckout
shipToCustomerPartyId${shipToCustomerPartyId}
shipping_contact_mech_id${shipping_contact_mech_id}
shipping_methodNEXT_DAY@UPS
may_splitfalse
is_giftfalse
checkOutPaymentIdEXT_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!

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 *