Tutorial: Set up LoadGen Load & Performance WebTesting with the LoadGen Core Agent for Linux and Windows


Welcome to our step-by-step tutorial on setting up LoadGen Load & Performance WebTesting with the LoadGen Core Agent for Linux and Windows. This guide is designed to help you harness the power of LoadGen's latest features, available from the Q2-2023 release, for efficient and robust web testing.

We focus on user-perspective testing using popular browsers such as Chrome, Chromium, Microsoft Edge, Firefox, and from Q3-2023, Webkit. This tutorial will guide you through recording and converting your user interactions - clicks, typing, and other actions on your browser pages - into actionable data and validations.

We'll also delve into using variables and data sources to effortlessly input data into your Software as a Service (SAAS) applications. One of the significant aspects we cover is how to measure the waiting time associated with specific user actions, a key metric in evaluating user experience and application performance.

Whether you are operating from Linux or Windows devices, this guide has you covered. Let's dive into the world of LoadGen Load & Performance WebTesting and uncover the potential of efficient web application testing.

Please note

The components of the LoadGen test infrastructure, including the LoadGen Director, LoadGen Core Agents, and LoadGen Agents, all require network communication between them. In any setup, whether it's on-premises or remote, the network infrastructure plays a crucial role in ensuring seamless performance and data exchange. Therefore, it's essential to establish a reliable network connection.

If your LoadGen components are set up in different networks, you need to create a secure connection between them. This can be achieved through techniques like establishing a Site-to-Site Virtual Private Network (VPN). This connection will ensure secure and reliable communication between your VDI environment and the network hosting your LoadGen Director and LoadGen Launcher Agents.

Remember that the specific setup and configuration will depend on your unique network architecture and the specifics of your testing requirements. Always consult with your network administrator or IT team to ensure optimal performance and security.

Read more about network traffic here

Step 1: Run the LoadGen Configurator and prepare the LoadGen Core Agents

Before reading this article first follow these steps:


Step 2: Create the LoadGen Core Agent Load Profile

  1. Create a new LoadGen Director Canvas, by clicking the Add a canvas icon.

  2. Choose LoadGen Core Agent.

  3. Choose WebTesting.
  4. Add a name for your canvas.
  5. Press the Flows tab page.
  6. Create a new Flow or download a workload from the LoadGen Workload Exchange.

    LoadGen has streamlined the process of accessing and importing a wide variety of workloads via its integrated feature, the Workload Exchange. From within the LoadGen software itself, you can directly connect to the Workload Exchange. This hub allows you to browse through numerous workloads, all created and shared by our active LoadGen community.

    To utilize this feature, look for the 'Workload Exchange' option within the 'Flows' tab and click on it. This action will open a new window and connect you straight to the Workload Exchange. Once there, you're free to explore and find a workload that aligns with your testing requirements. Importing your chosen workload is a matter of a simple click. LoadGen will handle the rest - automatically downloading and importing the workload into your active profile.

    Once the process is complete, your newly imported workload is readily available in your 'Flows' tab, ready to be used in your LoadGen testing environment. This seamless integration of the Workload Exchange within LoadGen enhances your testing capabilities by providing quick and easy access to a diverse range of community-created workloads.

Step 3: Create a new Workload

After adding a name for your Web Testing Profile, we'll explore how to work with 'Flows'. In LoadGen terminology, a 'Flow' or 'Workload' is a sequence of user actions that you wish to simulate and monitor. This could involve a series of clicks, page navigations, data entries, or any other interactions a user might have with a web application. Read more about the architecture of a workload in this article.

  • Flows: These are the sequences of actions that your simulated users will perform during the test. These can include a variety of actions such as logging into a site, navigating through pages, completing forms, or performing transactions.
  • Add new...: This option allows you to create a new Flow or Workload.
  • Link to existing...: If you have existing flows, user profiles, or testing conditions that you want to incorporate into your current web testing profile, you can use this option. This allows you to reuse components that you've created for other tests, which can save you time and ensure consistency across your tests.
  • Edit: This option allows you to modify any aspect of your web testing profile. You can change the parameters of your flows, add or remove user profiles, or alter the conditions of your test. Clicking this option will open the LoadGen Studio, where you can edit your flow directly.
  • Remove selected: If there are elements of your web testing profile that you no longer need or want, you can use this option to remove them. This helps keep your test setup clean and focused on the elements that are most relevant to what you're trying to achieve.

Let's create a new flow. In this flow, we will create one simple LoadGen Application and this application will browse to the LoadGen website, open the Products page, and the Free-Trial page.

  1. Click the Add new... button:
  2. Add a name and description for this flow.
  3. Set up your user types. If you opt for the default settings, a single user type named "Normal" will be created, and all your users will be directed to this user type.
  4. Create your first LoadGen Application by clicking the + sign.
  5. Provide a name and description for your application. At this stage, you can also select the browser that will be used for recording and conducting the actual load test.
  6. Select which user type will process this newly created application.
  7. Creating new Application Blocks allows you to manage and segment your application testing process effectively. These blocks help to break down complex processes into manageable sections, facilitating precise error detection and troubleshooting. When creating a new Application Block, you'll provide a name and description for it, clearly defining the specific actions or processes this block is intended to test or measure. This approach ensures a more organized and efficient testing process, making it easier to identify and resolve issues that might affect the user experience.
  8. Save the newly created LoadGen Application.
  9. Please note, within the LoadGen Studio you can adjust the Proxy settings, by opening the LoadGen Application and pressing Next until the Proxy Settings step.
  10. Continue the flow creation wizard, by pressing Next, add Variables if you already want to add one. Otherwise, press Next again.
  11. Load testing is an iterative process, and to effectively measure system performance under varying loads, it's crucial to set up iterations correctly. The main iteration property in LoadGen allows you to specify how often the applications in the flow should be repeated. Read more about iterations in this article. Adjust accordingly and press Next.
  12. Press Finish to save your Workload, this newly created Workload will directly be connected to your canvas.

Step 4: Add one or multiple users

The Testusers section within LoadGen deals with the configuration of test users. These users are not actual end-users, but rather, they are placeholder users created for the purpose of the load test. The test users simulate real user behavior and interactions with your web application, allowing you to measure system performance under different load conditions.

There are two key concepts to understand here:

  1. Available Users (not in profile): These are the potential test users that can be used in the load testing process but have not yet been included in the current profile. You may have a pool of these users to draw from when setting up different testing profiles.
  2. Active Users in Profile: These are the test users that have been assigned to the current load-testing profile. They are the users that will be actively interacting with your application during the load test.

It's important to note that these test users can be linked to specific website users based on the data sources within your workload. This means that when you review the transaction results after the load test, you can identify which test user corresponds to which set of user interactions. This allows for a more granular analysis of performance data and helps identify specific areas where the application may be underperforming.

Remember, the purpose of these test users is to replicate the activities of real users as closely as possible. They help provide a realistic picture of how your application behaves under different user loads and interaction patterns.

  1. You are able to add one or multiple users at once. Press the Create users... button.
  2. Manually add the users or choose to use a CSV file.
  3. Fill in the Username and press Next. Do you want to add multiple users? You can include a generating statement in the username, using the [X:Y[:Z]] format, where X is the start value, Y is the end value, and Z is the number of digits to use.
    Example: User[1:25:3] will create User001 to User025, inclusive.
  4. Review your settings and press Finish.
  5. Now drag and drop the users from the Available Users (not in profile) grid to the Active Users in Profile grid. Please note: with the LoadGen trial license you can only use a maximum of 5 test users.

Step 5: LoadGen Agents

LoadGen Core Agent

The LoadGen Core Agent is a vital component of our web testing ecosystem. It is designed to initiate the designated browser as specified in the LoadGen Application, enabling the simulation of user interactions within the context of a chosen user profile. Whether it's simple clicks or complex navigation patterns, the LoadGen Core Agent can emulate them all, allowing you to create realistic and highly accurate testing scenarios.

When starting with LoadGen Agents, we recommend adding your local machine first. This will allow you to familiarize yourself with the operations of the LoadGen Agents before introducing more complexity into the testing environment. As you grow more comfortable, you can add additional LoadGen Agents through the LoadGen Director to simulate more diverse and extensive user activities.

Remember, a well-configured LoadGen Core Agent is key to simulating realistic user behaviors and obtaining accurate results from your web testing exercises. So take the time to set it up correctly - your test results will thank you!

  1. We advise you to add your local machine just to get familiar with LoadGen Agents and add more LoadGen Agents from the LoadGen Director at a later moment.

    To ensure seamless operation of the LoadGen Core Agent, it is important to install the .NET Runtime Core 6.0 on your system. This will provide the necessary runtime environment for the agent to function effectively. After ensuring the runtime is in place, you can start the LoadGen Core Agent from the following location: C:\Program Files\LoadGen\LoadGen Core Agent - LoadGen.Core.Agent.exe.
  2. In this step you need to set up your LoadGen Core Agents, you can add any machine in your IT environment, read more about LoadGen Agents in this article.
  3. Below you see the window that the LoadGen Director uses to connect to LoadGen Core Agents:
  4. With the Add button you can add the LoadGen Core Agent machine, please note if you use a name, make sure the LoadGen Director can resolve the IP Address of the LoadGen Core Agent. Do you want to add multiple Core Agents? You can include a generating statement in the agent name, using the [X:Y[:Z]] format, where X is the start value, Y is the end value, and Z is the number of digits to use.
    Example: AGENT[1:25:3] will create AGENT001 to AGENT025, inclusive.
  5. After this step you need to install the LoadGen Core Agent on the Launching Agent, please read about how to do this in this article.

Step 6: Load Scenario

A Load Scenario holds up 1 or more phases (Load Ramp-Up) where vUsers are triggered to start their session and thus place load or stress on the back-end infrastructure. You also can use Custom Actions where you can send emails or start processes on multiple events during a load test. Read more about Load Scenarios in this article.


Step 7: Target Environment

The "Target Environment" setting in LoadGen is essential as it specifies the environment in which the load test will be conducted. This could be a local development environment, a staging environment, or a production environment. It's crucial to select the correct target environment to ensure the load test accurately simulates the conditions under which your application will operate. For instance, if you're preparing for a product launch, it would be ideal to perform load tests in an environment that closely mirrors your anticipated production environment. This helps ensure the results of your load tests are as relevant and actionable as possible, leading to more effective optimization and performance improvement efforts.

  • Desired Resolution: Determines the resolution of the browser window that will be used during the load test.
  • Custom Resolution: This allows you to set a specific resolution for the browser window during the load test that is not included in the pre-defined options.
  • Width: Refers to the width of the browser window in the custom resolution setting.
  • Height: Refers to the height of the browser window in the custom resolution setting.
  • Use Proxy: If enabled, the load test will be conducted through a proxy server. The proxy can be overridden by a Load Application itself.
  • Headless Mode: If enabled, the load test will run without displaying the browser. This is useful for running tests in the background or on servers without a graphical user interface.

Step 8: Record and prepare your Workload

In "Step 8: Record and Prepare Your Workload", you will be taking important strides toward building a realistic simulation for your load test. This stage involves recording user interactions with your application to create a sequence of actions, also known as a "workload". This workload forms the basis of the user behavior that will be simulated during the load test. The more accurately this workload reflects real user behavior, the more valuable your load testing results will be. Therefore, it's crucial to spend time carefully recording and preparing your workload, ensuring it covers a representative range of actions and scenarios that your application will likely encounter in the real world. With a well-crafted workload, you're setting the stage for a meaningful and insightful load test. Read more about the LoadGen Studio in the section overview.

  1. Press OK to save your canvas, and start the LoadGen Studio, or open your newly created canvas and press the Edit button from the Flows tab page.
  2. The LoadGen Studio will open, and you will be presented with the following overview.
  3. Press the LoadGen Web application within the user type Normal, then double-click on the Open page application block.
  4. The LoadGen Studio Recorder will open.
  5. On the left (Toolbox), you can find all of the different actions which you can use to build robust workloads. Read more about all of the available actions in this article.
  6. Click on the Record button now. This action will initiate the browser you have selected in the LoadGen Application, opening it with an empty tab. This blank slate is your starting point for creating the user interactions that will form your workload.

  7. Notice the red square that appears as you navigate through the website. This feature highlights each interactive element on the page, enabling you to record different actions simply by hovering over the website's controls. As you add a URL and execute actions, these events are meticulously captured as validations. This level of detail provides you with optimal oversight during testing and allows you to assess what happens if certain actions take longer than expected.
  8. Click through the site, please note: with the LoadGen Trial version you can only use 5 actions. For a full Proof of Concept license please contact us!
  9. When done, switch back to the LoadGen Recorder and press the Record button again, the recording will stop and you can see something like below.

Let's take a look at the first steps up closely:
The provided workload script describes a series of actions that are performed as part of a load test. Here is a step-by-step explanation:

  1. Navigate To URL "https://loadgen.com/": This step instructs the browser to open the specified URL, which in this case is https://loadgen.com/.
  2. Wait for Page to be ready (NetworkIdle): After navigating to the website, this step ensures that the browser waits until the page has fully loaded before proceeding with the next action. "NetworkIdle" is a specific state indicating that there are no more than 2 network connections for at least 500 ms.
  3. Wait for 'GetByRole(Button, where { Name = "Accept"})' (timeout: 10, initial wait: 0): This step instructs the browser to wait for a specific element to appear on the webpage. The element in question is a button with the role "Button" and the name "Accept". The browser will wait up to 10 seconds (as specified by the timeout parameter) for this button to appear.
  4. Locator not found: This line indicates that the specified element (the "Accept" button) could not be found on the page initially.
  5. Locator found: After some time, the specified element (the "Accept" button) was found on the page.
  6. Left click at "LastValidatedLocator": This step instructs the browser to simulate a left mouse click on the last validated locator, which in this case is the "Accept" button that was just located.
  7. Wait for Page to be ready (Load): Finally, the browser waits for the page to fully load after the button click action. The "Load" event is a specific state indicating that the page and all its resources have been loaded.

This script represents a very common sequence in load testing, where a browser navigates to a webpage, waits for elements to appear, interacts with those elements (such as clicking a button), and then waits for the subsequent page to load.

Step 9: Start your test

Return to the LoadGen Director interface as your preparations have been completed and you're now ready to launch your test. Navigate to the "Run your test" section and click on the "Start" button to begin.

Was this article helpful?
0 out of 0 found this helpful