In a VS load test that contains Web tests, the load test attempts to simulate the caching behavior of the browser. Here are some notes on how that is done:
Important Note: When running a Web test by itself (outside of the load test), the Cache Control property is automatically set to false for all dependent requests so they are always fetched; this is so that they can be displayed in the browser pane of the Web test results viewer without broken images.
There is a property in the Load Test Scenario settings for "Percentage of new users". This setting has impact on a few different aspects of the load test execution. The percentage is a measure of how many of the simulated users are pretending to be "brand new" to the site, and how many are pretending to be "users who have been to the site before".
A better term to describe a new user is "One Time User". This is because a new user goes away at the end of its iteration. It does not "replace" a different user in the pool. Therefore, the term "New User" should be considered to be a "One Time" user.
The "Percentage of New Users" affects the following whether the tests contained within the load test are Web tests or unit tests:
The "Percentage of New Users" affects the following Web test features that are not applicable for unit tests:
The below graphs (taken from test runs in VS 2010) demonstrate the difference between a new user and a return user. The graphs are based on a 10 user / 50 iteration run, but with different percentages for "new users" on each run.
This article shows how changing the caching settings in your Visual Studio tests and on your web server can impact your test. It also shows a real world demonstration of the difference between NEW and RETURN users.
sc-status, COUNT(*) AS Total
to_timestamp(date, time) between
timestamp('2010-02-12 02:13:22', 'yyyy-MM-dd hh:mm:ss')
timestamp('2010-02-12 02:18:22', 'yyyy-MM-dd hh:mm:ss')
All About Caching and How Visual Studio Simulates Browser Caches - Testing The Testing Strategy - Site Home - MSDN BlogsContreraznt&automated