Load testing
Check for performance issues on your web site when you expect an increased user load. No need to use resources and set up your own machines to create this load. You can use cloud-based load testing to provide virtual machines that generate the load of many users accessing your web site at the same time.
Your web site must be publicly available on the internet for load testing using Team Foundation Service to access it.
If you already have existing load tests, or you know how to create them using Visual Studio, jump ahead to configure your project to run load tests in the cloud.
Create a web performance and load test project
If you don’t have Visual Studio 2013 Ultimate Preview, get it here.
Create a web performance and load test project.
Record a web performance test
Create a web performance test.
Your web browser opens.
Enter the URL for the website that you want to test.
Use your application like you expect your customers to use it. For example, if you have a web store app then search for items and add them to the shopping cart.
The recorder will capture the HTTP requests and responses.
When you’re done, stop recording.
Now, Visual Studio looks for dynamic parameters for the HTTP responses to each of your HTTP requests. A progress bar is displayed while this happens. For example, a session id is a dynamic parameter.
If dynamic parameters are found, a table displays allowing you to assign constant values to each of the dynamic parameters.
Edit test properties to specify performance goals. For example, you can choose a page and set a response time goal to 1 second for that page.
Save the test.
Create a load test
Create a new load test in the web performance and load test project.
When the load test wizard appears, choose the load pattern step. Change the load pattern to step load which gradually adds users over time.
Choose the test mix step.
Add the web performance test you created.
Move the web performance test to the list of tests to run.
When you finish the wizard, the web performance test is added to the load test and appears in the load test editor.
Configure your project to run load tests in the cloud
If you have existing load tests that you created using Visual Studio 2010 or Visual Studio 2012. Simply open your existing project using Visual Studio 2013 Preview first.
Edit the test settings file to configure your project to run your tests using Team Foundation Service. (Only load tests can be run in the cloud.)
You do not have to connect to Team Foundation Service with your Visual Studio account until you are ready to run the load test.
Connect to your team project
Before you can run your load tests in the cloud, you must connect to your team project for your Team Foundation Service. (If your team doesn't already have a Visual Studio account or a team project, create them.)
Connect to your team project from Visual Studio Team Explorer.
Display the list of available team projects.
If you have not yet connected to your Team Foundation Service account, then you need to add it to your list.
Enter the name for your account -[your account].visualstudio.com.
If you are prompted to sign in to your Microsoft account, go ahead and do that.
Select the server from the list and then select your team project. Now you can connect.
Run and analyze your load test
Run the load test in the cloud using Team Foundation Service.
You can see when your test is in the queue for the service.
When your load test is ready to be run, the test status changes to: Acquiring resources. For a large test run this can take up to ten minutes while the service does the hard work of setting up machines and agents for you.
When the test is running, you can see the performance. Choose view status messages to see any errors, warnings or other information related to your load test run.
You can also view the throughput.
After the load test is finished, you can download the report.
When it has downloaded, you can view the report.
The results for the completed test includes performance counter data, threshold violations, and error information.
Choose the detail view. By analyzing the step load pattern for users, you can identify the user count where your performance fails to meet your requirements.
Fix any performance issues in your application’s code and rerun the test. You can also refine your test to better simulate real-world loads by specifying various web performance test properties, load test scenario properties and run settings properties.
View your load test runs at any time
Use load test manager to view past load test runs or currently running load tests. (You must have a web performance and load test project open to do this.)
Now you can view any load test runs started by any member of your team.
You can filter out the test runs that you see by state, date, or user who created the test run.
Q&A
Q:Can I use cloud-based load testing to test any internal web site?
A:No. You cannot use a web site that is only available internally to your company. For example, an internal staging or preproduction deployment. However, you can open up the endpoint for your web site for limited IP addresses or users to work with cloud-based load testing. Or you can run a load test locally using Visual Studio.
Q:What are agents and why do I need them?
A:Agents simulate the load against your web site by creating the virtual users. You might need to use more agents depending on your load test and the number of virtual users you require. Increase the number of agents if you are getting status messages that the agent aborted due to load, or if the downloaded results show high CPU utilization for an agent.
The maximum number of agents that you can have currently is 1. If you want to increase this limit, you can apply to join our early adpotion program.
Q:Are there any limits on virtual users when running cloud-based load tests?
A:Yes. With the current preview program you cannot use more than 15,000 virtual user minutes per month. If you want to increase this limit, you can apply to join our early adpotion program.
Q:How many load tests can I run concurrently with Team Foundation Service?
A:Right now each user can only run one load test at a time.
Q:How can I run load tests locally and in the cloud from the same project?
A:You can have multiple test settings in a project. Add another test settings to the solution items folder. Now you can use one to run your tests locally and the other to run your load tests in the cloud. To switch between them, use the context menu to set the appropriate test settings to be active.
Q:Can load tests use other test types in their test mix besides web performance tests?
A:Yes, you can include unit tests and coded web tests. But coded UI tests are not supported with cloud-based load testing.
Q:Can I debug a load test while it's running in the cloud?
A:No. You need to run a load test locally to debug it.
Q:Can virtual users simulate pausing between test steps?
A:Yes, you can specify think times. Choose a scenario in your load test and edit the think time in the Properties view.
Q:When I download my load test report, where is it stored?
A:There is a local SQL express database where the downloaded reports are stored. You can change the default location if you want.
Q:Are there any load testing features that are not supported when you run a load test using cloud-based load testing?
A:These features are not currently supported:
Goal-based load patterns
Iteration-based runs
Network mix property
Warm up and cool down time
Agent to Use in test settings - use the core count property instead
SQL Trace properties in run settings
IP switching
Q:Having problems running your load tests in the cloud?
A:Check out the latest troubleshooting advice.
Q:Where do I get more information about simulating real-world loads?
A:Find out more about how to speciy web performance test properties, load test scenario properties and run settings properties.
Q:Can I learn more about this preview and early adoption program?
A:More details and a video here.