Getting started with Test Studio Load Testing is a snap. Do you have existing functional tests in Test Studio? Have you been capturing Fiddler traces of site activity during troubleshooting or monitoring?
You can set up powerful profiles by using already created web tests without having to modify them. You can also quickly tailor "think time" delays to simulate the pauses real users make as they navigate your site. Or use the invaluable data from a Fiddler capture directly, by importing it into Test Studio as a user profile!
To get the most out of your Load Test, it is best to follow these simple guidelines:
Make sure the user profile is parameterized with the necessary dynamic targets - these allow you to simulate multiple different users are using the application under test.
Make sure you have think times with deviations - these have a random duration. By having some users at different intervals sitting out of the test (thinking) it not only mimics real world usage better, but it allows for your agents I/O to not be as congested. It may be counter intuitive, but having your virtual users stop to think for a time will actually increase the number of users and requests that your agent can complete.
Use ramp up times to build up your users from a small number to larger numbers. Again, if you start with a large consistent load, without any ramping, you will likely clog the I/O. By ramping up from lower numbers you give your think times better chances to get involved.
The below steps walk you trough the scenario to create and fully define a load test according the above guidelines.
- Click the Add New Test button.
- Select Load Test.
- Enter a name for your new load test.
- Click the Create button.
A "User Profile" in the load test is a specific sequence of HTTP traffic that represents how one user is interacting with your web applications. A load test must have at least one user profile. Your load test may contain as many user profiles as you like.
Open the created load test and select its Design view. Choose from the available options to select traffic for a new user profile:
- Manually capture new traffic from a selected web browser.
- Capture HTTP traffic generated by executing an existing Telerik functional web test in a selected browser.
- Import an existing user profile from another load test.
- Import from a Fiddler trace traffic.
The recorded HTTP requests usually requires additional modifications and this can be done in the Edit User Profile window. It is recommended to remove any unnecessary HTTP requests recorded during the UI session to capture the traffic - such as images, icons, css styles, js sripts, etc., which were loaded during the live browser session. These are not needed for the load testing purposes as the load run only sends requests and logs their responses without a browser session. That makes any HTTP calls to load visual content on the page unnecessary.
The Edit User Profile window provides different options to modify the captured traffic:
- Modify the HTTP transactions
- Filter User Profile
- Add custom cookie
- Add/Remove/Change the think times
- Find & Replace URLs
A "Dynamic Target" is a unique parameter or variable used by the application to generate information like a unique user ID or session ID. These values are generated by the web server, sent to the browser which then later returns that value back to the server so that the application can match the new request to a previous HTTP transaction. To accurately simulate users via virtual users it is important to correctly return these Dynamic Targets during the load test execution.
The load testing settings include the amount of virtual users to simulate, the time for which to generate the load and the type of load divided as per the user profiles. Adjust the available settings as per the load scenario requirements.
To be able to perform a load test run, you need to assign virtual users to the current machine - for the case of running a load test locally; or to the machine, which is configured as a Scheduling server - in the case when using multiple machines to run the load scenario. The amount of users to assign can be easily considered having in mind the applied test settings for Available Users.
In this blog post you can find a tutorial for creating a load test in Test Studio using the traffic captured in Fiddler Everywhere.