Create Business Transactions

Understand the context

The main goals when load testing your application are to obtain an accurate evaluation of performance and to precisely identify performance bottlenecks. To achieve these goals, it is essential to design scenarios that define realistic populations and realistically-behaving Virtual Users. In addition, one technique that will greatly help you to in refining your benchmarks is to use what are known in NeoLoad as Transactions.

A Transaction is a set of related pages that achieve a consistent business interaction. A typical example is the set of pages a user goes through to log in to an application. The idea is to gather these pages into a Transaction so that NeoLoad can produce precise time consumptions and statistics on these pages as a whole. These Transactions will appear separately in test results making analysis easier. In the login example, you would obtain statistics on the response times users experience from the moment they start connecting to the application to the moment they are actually logged in.

The first step in using Transactions is to identify recurring behavior, especially behavior that represents an important functionality in your application. Once this behavior pattern has been identified, the corresponding pages must be assembled in a Transaction, a Virtual User Transaction in NeoLoad parlance. This tutorial details the steps involved in building these Transactions.

Virtual Users are one of the main building blocks NeoLoad provides to create load test scenarios. Virtual Users assemble recorded HTML pages, Populations group Virtual Users and, finally, a load test scenario assembles Populations. This tutorial will briefly describe the steps involved in building a Virtual User that has a Transaction. It will also show the types of results obtained using this technique.

Example overview

The example uses the JPetStore application, an on-line pet store web application.

The application provides typical merchant website functionalities : creating an account, signing in, browsing through pets, adding pets to a shopping cart, and finally checking out and purchasing what has been added to the cart. You can identify the purchasing phase as critical because it is resource greedy and time consuming. You may need and want detailed statistics on this phase.

You can ignore the interactions concerning the actual choice of pets and their quantity. You are only interested in the pages in which the client confirms and checks out what he or she has purchased. The following screen shots depict those pages:

  1. Whatever the client has ordered, the following page submits a form containing payment and billing address information (/jpetstore/shop/newOrderForm.shtml):

  2. The second step is a page prompting the client for confirmation of previously entered billing address information (/jpetstore/shop/newOrder.shtml):

  3. The final step is a page summing up payment, address and order details (/jpetstore/shop/newOrder.shtml_1):

Build a Business Transaction when recording

During the recording, the Recording Bar allows defining (business) Transactions.

To create a business transaction during the recording, follow these steps:

  1. Start the recording.

  2. To begin a new business transaction, enter its name in the Transaction field.

  3. Carry out the actions relating to the business transaction in the browser.

  4. To finish the business transaction, delete or replace the name in the Transaction field.

  5. To stop the recording, close the browser or click on the Stop button in the NeoLoad Recording Toolbar.

Note: Only those business transactions at the Virtual User root may be created using the Recording Toolbar.

Build a Business Transaction after recording

This section details the steps involved in creating a (business) Transaction relating to the previous sections.

To build a business Transaction after recording, follow these steps:

  1. Select the Design mode: Click the Design button.

  2. Select the Virtual Users tab.

  3. Add a Virtual User Container:

    • Adding a Container to a Virtual User.

    • In the Virtual Users pane, select the last page in the Virtual User (/jpetstore/shop/newOrder.shtml_1) then right-click on the page. In the contextual menu, select Insert after, then Container.

    • Select the pages to add to the Container, then drag and drop the pages in the Container. You can select multiple pages by using a left click while holding the CTRL or SHIFT keys down.

In this tutorial you may have added the Container as the last element of the Virtual User. You may have added to the contents of the Container the three HTML pages included in the order interaction:

  • /jpetstore/shop/newOrderForm.shtml : contains the payment details and the billing address information,

  • /jpetstore/shop/newOrder.shtml: sums up order information and prompts the user for the confirmation,

  • /jpetstore/shop/newOrder.shtml_1: presents the order confirmation.

You know that the interaction involved by these three pages includes possibly time consuming processing such as account verification and order submission. This is where having fine grained results on a particular Container will become useful.

Build a population and a scenario

In this tutorial you may have created a Population called "Buyers" containing the "PetStore" user. The Population as a whole represents a realistic projection of how the Pet Store application will be used.

In the Runtime section, a scenario called "Scenario1" has been created and configured so that it only contains the "Buyers" Population.

Analyze Business Transaction results

This section describes where to analyze business transactions. The whole point of creating business transactions is that NeoLoad explicitly identifies them and provides distinct results for each one.

For more information about analyzing results, see Results.

Results summary

After having launched the scenario in the Runtime section, the first place you will see results specific to the Container is in the Results Summary tab, which can be viewed in Results mode. A section called Containers summarizes the statistics for all the Containers used in the scenario. The summary provides an overall view of a particular business transaction (Container) behavior.

Results values

The Values tab in the Results section gives more details on the business transaction.

Select a particular Virtual User and choose the Logical Actions item in the Filter list. You can select the Container representing the business transaction, for example the "Checkout" Container. You may now work with the various statistical elements to deepen your understanding of the business transaction behavior.

Results graph

The Graph tab in the Results section also provides details on the business transaction.

You can select a particular Virtual User and then select the Container representing the business transaction, in this case the "Checkout" Container.