Thursday, July 25, 2019

Setting up a Load Test Rig


Load testing is very important part of the testing cycle. It allows you to test your application under stress by increasing the parallel users of the application. To perform a good load test, you need to generate more and more traffic, which you can't do only using your development machine. As a solution, you can use load test rig to generate more traffic to your application. Load test rig is made up of one test controller machine and one or more test agent machines. Test controller coordinate the agent machines and agent machines generate load against the application.

This post will explain how to configure the load test rig. You would be able to find step by step guide which explains how to configure a test controller and test agent.
Let's get started. 
  • Create two Azure VMs in same vnet. One for the test controller and other for the test agent.
  • First, we need to configure the test controller
  • Log in to the controller VM
  • You would be navigated to where you can download test controller and agent
                    

  • Download the Controller.
  • Install MSSQL server. In this post we use  the SQL Server Express.
  • Install the downloaded test controller.
  • Use default location or select new location and Install

  •           After Installation completed, launch the test controller to configure it.
  •   Specify the logon account for the load test controller service. You can select either local system or specifically provide the account as shown in the following screen shot.
  •  After giving user account and password, you can test the connection by clicking on “Test”. Configure the test controller with local admin user.
  •      When we perform the load test, we need to save the test results. For that purpose, we use a database.
  •      Select the SQL server instance and click on “Apply Settings” button.


  •   Wait until configurations complete. You would be able to see the summary page.

  • After configuration completed, you can check user groups of the machine and can find following newly added user groups
    • o   TeamTestAgentService
      o   TeamTestControllerAdmins
      o   TeamTestControllerUsers
  • If you need to monitor performances of controller machine while do load testing, start following services and add user to “Performance Monitor Users Properties” user group.
    •          Go to services and start following services and set “Automatic” as startup type

              
    • Open Computer Management Window à Go to “Local Users and Groups” section. Find “Performance Monitor User” under groups.
    • Add controller configured user (Ex-: doadmin)



So far, we have configured test controller successfully. Now we can configure the test agent.
  • Log in to the Agent VM.
  • Go to URL ( https://www.visualstudio.com/downloads/?q=agents ) and download the agent.
  • Install the agent and move to configuration window. Test agent is controlled and monitored by the test controller. In this configuration, we build the connection between the test controller and test agent.
  • Give the user name and password of the user. Configure the test agent with a local admin user.
  • To register with test controller, enter test controller machine name with port 6091
  • Apply Settings


After clicking on “Apply Settings” button, summary pop up will appear.

  • If you need to monitor performances of agent machine start following services and add user to “Performance Monitor Users Properties” user group.



Test agent configuration succeed. You can add multiple agents by following the same configuration steps.

This post explained how to configure the test controller and test agent of the load test rig. Let's discuss how to work with the load test rig in the next post. 


No comments:

Post a Comment