vsats performance tests

12
8/27/2015 Run performance tests on an application before a release https://msdn.microsoft.com/enus/library/dn250793(d=printer).aspx 1/12 Run performance tests on an application before a release Use load testing in Visual Studio Enterprise to find performance issues before you release your app. Don’t want to use your resources and set up your own machines to create this load? You can use cloud‐based load testing to provide virtual machines in the cloud that generate the load of many users accessing your web site at the same time. All you need is a Visual Studio Online account. Learn more about this cloud‐based load testing service. To load test your app with on‐premises resources or using cloud‐based load testing, you first create web performance tests. These tests are used in your load tests to simulate multiple users performing actions in your app at the same time. Create a web performance and load test project 1. If you don’t have Visual Studio Enterprise, get it here. 2. Create a web performance and load test project. Record a web performance test 1. Create a web performance test. Visual Studio 2015 Other Versions Sign in MSDN subscriptions Get tools

Upload: jenadebisankar

Post on 11-Dec-2015

8 views

Category:

Documents


1 download

DESCRIPTION

VSATS Performance Tests

TRANSCRIPT

8/27/2015 Run performance tests on an application before a release

https://msdn.microsoft.com/enus/library/dn250793(d=printer).aspx 1/12

Run performance tests on an applicationbefore a release

Use load testing in Visual Studio Enterprise to find performance issues before you release your app.

Don’t want to use your resources and set up your own machines to create this load? You can use cloud‐based load testingto provide virtual machines in the cloud that generate the load of many users accessing your web site at the same time. Allyou need is a Visual Studio Online account. Learn more about this cloud‐based load testing service.

To load test your app with on‐premises resources or using cloud‐based load testing, you first create web performance tests.These tests are used in your load tests to simulate multiple users performing actions in your app at the same time.

Create a web performance and load test project

1. If you don’t have Visual Studio Enterprise, get it here.

2. Create a web performance and load test project.

Record a web performance test

1. Create a web performance test.

Visual Studio 2015 Other Versions

Sign in MSDN subscriptions Get tools

8/27/2015 Run performance tests on an application before a release

https://msdn.microsoft.com/enus/library/dn250793(d=printer).aspx 2/12

Your web browser opens.

2. Enter the url for the website that you want to test.

3. Use your application like you expect your customers to use it. For example, search for items and add them to theshopping cart.

The recorder will capture the HTTP requests and responses.

4. When you’re done, stop recording.

Was this page helpful? Yes No

8/27/2015 Run performance tests on an application before a release

https://msdn.microsoft.com/enus/library/dn250793(d=printer).aspx 3/12

Now, Visual Studio looks for dynamic parameters for the HTTP responses to each of your HTTP requests. Aprogress bar is displayed while this happens.

If dynamic parameters are found, a table appears. It lets you assign constant values to each of the dynamicparameters.

5. Rename your test. For example, ShoppingCart.webtest.

6. Edit test properties to specify performance goals. For example, you can set a page response time goal to 1 second.

8/27/2015 Run performance tests on an application before a release

https://msdn.microsoft.com/enus/library/dn250793(d=printer).aspx 4/12

7. Save the test.

Create a load test

1. Create a new load test in the web performance and load test project.

2. When the load test wizard appears, choose the load pattern step.

Change the load pattern to step load. This gradually adds users over time.

8/27/2015 Run performance tests on an application before a release

https://msdn.microsoft.com/enus/library/dn250793(d=printer).aspx 5/12

3. Choose the test mix step.

Add the web performance test you created.

Move the web performance test to the list of tests to run.

8/27/2015 Run performance tests on an application before a release

https://msdn.microsoft.com/enus/library/dn250793(d=printer).aspx 6/12

4. When you run cloud‐based load tests using your Visual Studio Online account, you can run those tests andgenerate load in an Azure datacenter that's closer to your users. That way, you reduce latency and simulate localconditions.

Select your Visual Studio Online account and the location where you want to run your load test.

5. When you finish the wizard, the web performance test is added to the load test and appears in the load test editor.

8/27/2015 Run performance tests on an application before a release

https://msdn.microsoft.com/enus/library/dn250793(d=printer).aspx 7/12

Run and analyze your load testYou can run your load test locally, or you can run it in the cloud using Visual Studio Online. All you need is a Visual StudioOnline account. If you run the load test in the cloud, you can generate more load without setting up test controllers andtest agents. To learn how easy it is to use cloud‐based load testing to run your load tests, go here.

Follow these steps to run your load test on your local machine.

1. Run the load test.

The test starts running.

8/27/2015 Run performance tests on an application before a release

https://msdn.microsoft.com/enus/library/dn250793(d=printer).aspx 8/12

2. While the test is running, you discover that the shopping cart page response time exceeds the value you set.

Add an analysis note to track the issue.

After the load test is finished, the summary is displayed.

8/27/2015 Run performance tests on an application before a release

https://msdn.microsoft.com/enus/library/dn250793(d=printer).aspx 9/12

The results for the completed test include performance counter data, threshold violations, and error information.

3. Choose the detail view. By analyzing the step load pattern for users, you can identify the user count where yourperformance fails to meet your requirements.

8/27/2015 Run performance tests on an application before a release

https://msdn.microsoft.com/enus/library/dn250793(d=printer).aspx 10/12

Fix any performance issues in your application’s code and rerun the test.

Improve your load tests

You can improve your test to better simulate real‐world loads by specifying various web performance testproperties, load test scenario properties and run settings properties. For example, you can specify the number ofnew users that will use web cache data in your load test.

Q & A

Q: How can I increase the capacity of my load tests?A: You can use cloud‐based load testing service, so you can run your tests across multiple virtual machines in thecloud. You can also use an on‐premises test controllers and test agents. See Create and run a load test.

Using a test controller and agents is not supported using the Visual Studio Enterprise trial version.

Q: How many virtual users can I configure in my load test?A: In the full version of Visual Studio Enterprise, the number of virtual users is unlimited. However, if you need toemulate thousands of users, use test controller and test agent machines.

8/27/2015 Run performance tests on an application before a release

https://msdn.microsoft.com/enus/library/dn250793(d=printer).aspx 11/12

emulate thousands of users, use test controller and test agent machines.

In Visual Studio Enterprise trial version, the virtual user count is limited to 250.

Q: Can I analyze load tests that ran previously?A: Yes, the open and manage results button in the load test editor. You can have multiple tests open at the sametime to compare runs, and create trend analysis reports comparing them. .

Q: Is there a difference between what I can analyze during arunning test versus a completed test?

A: Yes, these are the differences:

Performance counters   A smaller subset of the performance counter data is available while a test is running.

Views   When the load test run has completed, the Summary View and Details View are available.

Q: Can load tests use other test types in their test mix besides webperformance tests?

A: Yes, you can include unit tests and coded UI tests.

Q: Can virtual users simulate pausing between test steps?A: Yes, you can specify think times to simulate the time spent by a user on a web page.

Q: Why should I use cloud-based load testing?A: If you don’t want to set up machines for load testing, or you don’t have available resources, you can use the cloud‐based load testing service. It sets up virtual machines in the cloud that will run your load test. Note that your web sitemust be publicly available on the internet for load testing using Visual Studio Online to access it.

Q: How can I apply my web and load testing in a continuousdelivery model?

A: See Patterns and Practices book: Testing for Continuous Delivery with Visual Studio 2012 – Chapter 6: A TestingToolbox

Dev centers Learning resourcesMicrosoft Virtual Academy

CommunityForums

SupportSelf support