Introduction to Visual Studio Team System – Test Edition


Published on

  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • This is a manual test case template tailored to fit our needs
  • does not run Client-Side scripting
  • Record a simple Web Test
  • Record Result-Time and performance data to be used in Load Test
  • This error message is indicating that the web test tried to extract a hidden field called VIEWSTATE from the previous response but was not able to extract it. The current request tried to use the value, but since it was not there, you received this error. So why is the previous request not flagged as an error? The reason is that the previous request was probably redirected to an error page but still returned an http status of 200 OK. So although it did not go to the same page as it did when recording, it was marked as success because of the 200 OK. The built in Extract Hidden Fields rule does not know which fields it is extracting. It just extracts all hidden fields on the page and puts them in the context In the web test editor find the request that has the RequestFailed error in its response. 1. Then look at the form post parameters for this request to see what the hidden fields are named. For example $HIDDEN1.__VIEWSTATE. The thing you need to find is the number value after $HIDDEN. So in this case the number 1. 2. Once you find this, go to the previous request in your test. If it has an Extract Hidden Fields extraction rule and the extraction rule’s value for Context Parameter Name is 1, then you found the request which needs to be fixed. If you did not find an extraction rule or the value for the context parameter name does not match the number after hidden, then go up to the previous request. Continue this process until you find your match. The value for Context Parameter Name can be found by clicking on the extraction rule and then looking at the property browser.
  • I recorded my web test and now I am playing the web test back. The first time I played the web test back it was successful. However, when I come in the next morning and play back the test it fails with the 500 error you see below. Why would it playback successful right after recording and fail the next morning? The answer to this is that session variables typically stay alive for a certain amount of time. It can be anywhere from 5 to 30 minutes or longer. So even though your test has hardcoded values, it works during the playback right after the recording because the values are still active. By the time you play it back the following morning, your session has timed out and the values are no longer valid and your requests will start to fail. Go back to the playback UI and click on the first request in your web test. A lot of times, the session type variables will appear in the response of the first request. Then click on the response tab. Select the entire response and paste it an editor.(notepad, VS, etc.) Search for the name of the parameter you think may be dynamic. In my example this is the ControlID parameter. If you found it, move on to the next step. If not, click on the next request and go back to step b. Now look to see if the value of the parameter is different than the value in your web test. If it is, then this is a dynamic parameter that needs to be correlated. Here is an image of my response page. As you can see the ControlID parameter is different than the one in my test. Since the values are different, we need to extract the new value and bind the extracted value to the hard coded parameter.  The first step is to figure out an extraction rule which can be used to pull the new value out. You can usually use an extract text rule. I am going to use an extract text rule with the following values: Context Parameter Name = ControlID, Ends With = &, HTMLDecode = True, Ignore Case = False, Index = 0, Required = True, Starts With = ControlID =, Use Regular Expression = false. Now the dynamic value will be extracted and added to the test context with a name of ControlID. So we need to change the hard coded value in the failed request, to use this context parameter. Go back to the failed request and click on the dynamic parameter. In my example this is the ControlID parameter. Then bring up the property grid and click on the value property. This needs to be changed to pull the ControlID value from the test context. To have a value pulled from the context you use the following notation, {{ParameterName}}. I named the parameter ControlID, so I would set this value to {{ControlID}}.
  • Introduction to Visual Studio Team System – Test Edition

    1. 1. Testing Best Practices with VSTS Shahidul Islam, MPH QA Manager Emerging Health Information Technology 12/4/08
    2. 2. Agenda <ul><li>Visual Studio Test Edition for Software Testers (VSTEST) </li></ul><ul><ul><li>Manual Tests </li></ul></ul><ul><ul><li>Web Tests </li></ul></ul><ul><ul><li>Load Tests </li></ul></ul><ul><ul><li>TFS Work Item Tracking </li></ul></ul><ul><ul><li>TFS Reporting </li></ul></ul>
    3. 3. Sources for Test Cases by Test Type VSTS Web Tests
    4. 4. Test Plan <ul><li>Documents project-specific strategy for all test types. </li></ul>
    5. 5. VSTEST <ul><li>Visual Studio Test Edition for Software Testers </li></ul><ul><li>Author Tests </li></ul><ul><li>Run Tests </li></ul><ul><li>Publish and Share the results </li></ul><ul><li>Reporting with TFS </li></ul>
    6. 6. VSTEST Basics <ul><li>Test Projects are Visual Studio Projects </li></ul><ul><ul><li>Compile/deploy like any assembly in .NET </li></ul></ul><ul><ul><li>Visual Studio options under “Test Tools” </li></ul></ul><ul><ul><li>The solution should be stored within source control (like any other piece of code) </li></ul></ul><ul><li>Tool set integrated in VS allows for easy adoption from developers. </li></ul><ul><li>Testers are more integrated with the development process </li></ul>
    7. 7. Requirements Management
    8. 8. Manual Tests
    9. 9. VSTS Manual Tests—Excel <ul><li>File>Properties </li></ul><ul><li>Custom </li></ul><ul><ul><li>TestType: “Manual Test” </li></ul></ul><ul><ul><li>TestID: “Get a GUID from VSTS>Tools>Create a GUID” </li></ul></ul><ul><ul><li>Save As .mht file </li></ul></ul>
    10. 10. Web Testing <ul><li>Uses a recorder for test creation: </li></ul><ul><ul><li>Records web requests using Internet Explorer </li></ul></ul><ul><ul><li>Analyzes the HTML traffic– each response can be validated for expected behavior </li></ul></ul><ul><ul><li>Ordered series of HTTP requests against a target web applications </li></ul></ul><ul><li>Integrates with Visual Studio </li></ul><ul><li>Available only via VSTS Team Edition for Software Testers </li></ul><ul><li>Runs with Test Manager </li></ul><ul><li>Integrated with Team Build </li></ul>
    11. 11. Web Testing <ul><li>Web Tests are of two types: </li></ul><ul><ul><li>Recorded Tests </li></ul></ul><ul><ul><ul><li>Launch the browser </li></ul></ul></ul><ul><ul><ul><li>Record session steps </li></ul></ul></ul><ul><ul><ul><li>Playback recorded session </li></ul></ul></ul><ul><ul><ul><li>Convertible to (Coded Tests) C# or VB code to handle complex scenarios and flow control </li></ul></ul></ul><ul><ul><li>Coded Tests </li></ul></ul><ul><ul><ul><li>Scripted </li></ul></ul></ul><ul><ul><ul><li>Better, adapted from recorded tests </li></ul></ul></ul><ul><ul><ul><li>Playback </li></ul></ul></ul><ul><li>Supports: ASP.NET, HTTP based, Web Page, Web Services </li></ul><ul><li>Compatible with HTTPS </li></ul>
    12. 12. <ul><li>Demo then proceed to slide 43 </li></ul>Web Test Demo
    13. 13. Recording a Web Test <ul><li>Record a browser session using the Web Test Recorder </li></ul><ul><li>Analyze the http requests being recorded </li></ul><ul><li>Can pause in between requests </li></ul><ul><li>Recording can be a good baseline for coded Web tests </li></ul>
    14. 14. Recording a Web Test <ul><li>Steps: </li></ul><ul><ul><li>Test..New Test </li></ul></ul><ul><ul><li>Choose Web Test </li></ul></ul><ul><ul><li>Choose Default Visual C# test project </li></ul></ul><ul><ul><li>Create </li></ul></ul><ul><li>A new Internet Explorer instance opens up </li></ul>
    15. 15. Recording a Web Test <ul><li>Two windows open: </li></ul><ul><ul><li>A new Internet Explorer instance </li></ul></ul><ul><ul><li>Web Test Recorder on the left pane of the IE instance </li></ul></ul><ul><li>Each request or page navigated is displayed </li></ul><ul><li>Options available to stop or pause recording </li></ul><ul><li>Can add comments during recording </li></ul>
    16. 16. Recording a Web Test <ul><li>Once stopped, recorded test can be run from Test Window </li></ul>
    17. 17. Editing a Web Test <ul><li>Web Test Editor available once recording is stopped </li></ul><ul><li>Features: </li></ul><ul><ul><li>Toolbar for basic commands </li></ul></ul><ul><ul><li>Expandable Request Tree view of requests in the execution order </li></ul></ul><ul><ul><ul><li>Can expand to see Query String parameters or Form Post parameters </li></ul></ul></ul><ul><ul><li>Properties Window </li></ul></ul><ul><ul><ul><li>Properties and Settings of the Web Test </li></ul></ul></ul>
    18. 18. Editing a Web Test <ul><li>Adding a New Request: </li></ul><ul><ul><li>Right click on request to add new request </li></ul></ul><ul><li>Clean up unnecessary recorded steps </li></ul><ul><ul><li>Remove extraneous or wrong user actions </li></ul></ul><ul><li>Modify the order of requests </li></ul><ul><ul><li>Be conscious of dependent requests </li></ul></ul>
    19. 19. Editing A Web Test: Properties <ul><li>Properties: </li></ul><ul><ul><li>Description: Text for describing the test </li></ul></ul><ul><ul><li>Pre-authenticate: </li></ul></ul><ul><ul><ul><li>True: Every request includes authentication header (default) </li></ul></ul></ul><ul><ul><ul><li>False: Authentication header sent when requested </li></ul></ul></ul><ul><ul><li>User Name and Password: Values set using the Set Credentials button on Web Test Editor for sites using </li></ul></ul><ul><ul><ul><li>Basic authentication or </li></ul></ul></ul><ul><ul><ul><li>Integrated Windows authentication </li></ul></ul></ul><ul><ul><ul><li>Credentials can be edited directly on properties window or </li></ul></ul></ul><ul><ul><ul><li>Can bind to data source for multiple runs with different credentials – (recommended) </li></ul></ul></ul>
    20. 20. Editing A Web Test: Requests <ul><li>Requests: HTTP request steps which are executed in given order and whose response is processed </li></ul><ul><li>Request Tree in Web Test Editor consolidates child requests to be executed in order for main request </li></ul><ul><li>Properties of a Request: </li></ul><ul><ul><li>Cache Control </li></ul></ul><ul><ul><li>Encoding </li></ul></ul><ul><ul><li>Follow Redirects </li></ul></ul><ul><ul><li>Method </li></ul></ul><ul><ul><li>Parse Dependent Request </li></ul></ul><ul><ul><li>Record Results </li></ul></ul><ul><ul><li>Response Time Goal </li></ul></ul><ul><ul><li>Think Time </li></ul></ul><ul><ul><li>Timeout </li></ul></ul><ul><ul><li>URL </li></ul></ul><ul><ul><li>Version </li></ul></ul>
    21. 21. Editing A Web Test: Requests <ul><li>Cache Control: True/False directive to simulate browser caching </li></ul><ul><li>Encoding: Text format for requests - usually UTF-8 for HTTP traffic </li></ul><ul><li>Follow Redirects: True/False to honor status codes 300-307 (redirect) to final page or stop and treat the redirect as final page </li></ul><ul><li>Method: GET or POST </li></ul><ul><li>Parse Dependent Request: True/False to process dependent requests such as loading image files. True will get standard behavior (load images) </li></ul>
    22. 22. Editing A Web Test: Requests <ul><li>Record Results: Used only with Load Testing to determine if timing and performance data need to be included </li></ul><ul><li>Response Time Goal: Used with Load Test reporting to record how long the request took to process </li></ul><ul><li>Think Time: Delay (in seconds) to pause on page before processing next request </li></ul><ul><li>Timeout: Maximum time (in seconds) to wait for response before timing out and logging a failure </li></ul><ul><li>URL: URL of the request </li></ul><ul><li>Version: Versions of HTTP to use – default 1.1 </li></ul>
    23. 23. Editing a Web Test: Request Sub Items <ul><li>Request Sub-items: Simple requests can be enhanced with sub-items like validation rules etc. </li></ul><ul><ul><li>Dependent Requests: </li></ul></ul><ul><ul><ul><li>A normal HTTP request which has a parent request </li></ul></ul></ul><ul><ul><ul><li>Example: Load image on a page </li></ul></ul></ul><ul><ul><ul><li>Handled by Parse Dependent Requests property </li></ul></ul></ul><ul><ul><ul><li>Can have own dependent requests </li></ul></ul></ul><ul><ul><ul><li>Can be added explicitly – example, extraction or validate rule </li></ul></ul></ul>
    24. 24. Editing a Web Test: Request Sub Items <ul><li>Query String Parameters: </li></ul><ul><ul><li>Name=Value pairs set in the Property window </li></ul></ul><ul><ul><li>Show Separate Request Results: </li></ul></ul><ul><ul><ul><li>Used to group results in Load Testing </li></ul></ul></ul><ul><ul><ul><li>Result data is grouped if False (default); if True, displays separate grouping for data (response time etc) </li></ul></ul></ul><ul><ul><li>URL Encode: Determines if Name/Value will be URL encoded </li></ul></ul><ul><li>Form Post Parameters: If the request method is POST, enables two form POST parameters: </li></ul><ul><ul><li>Common Form Post Parameter </li></ul></ul><ul><ul><li>File Upload Parameter </li></ul></ul><ul><li>Headers: Name=Value pair to be included in HTTP header. Ex: </li></ul><ul><li>Validation Rules: Add validation rules to verify if response from the request is expected one </li></ul><ul><li>Extraction Rules: Capture data from response </li></ul>
    25. 25. Editing a Web Test : Transactions <ul><li>Allow grouping of requests as a unit to </li></ul><ul><ul><li>Document </li></ul></ul><ul><ul><li>Move/Copy </li></ul></ul><ul><ul><li>Capture timing information </li></ul></ul><ul><li>To insert: </li></ul><ul><ul><li>Right click at the request where the transaction is to be inserted </li></ul></ul><ul><ul><li>Complete the Add Transaction dialog </li></ul></ul><ul><li>Requests can be moved between transactions using drag and drop. </li></ul>
    26. 26. Editing a Web Test: Comments, Context Parameters <ul><li>Comments: Tests can be documented with comments </li></ul><ul><li>Context Parameters: </li></ul><ul><ul><li>Replace static values with dynamic values for property, value or parameter </li></ul></ul><ul><ul><li>Variables expand to real values at runtime to make the test flexible and dynamic </li></ul></ul><ul><ul><li>Usually done through Parameterizing Web Servers </li></ul></ul>
    27. 27. Editing a Web Test: Parameterizing Web Servers <ul><li>Select web test, and right-click </li></ul><ul><li>Select Parameterize Web Servers… </li></ul><ul><ul><li>Allows changing URLs from static to context-parameterized variables to re-target the test </li></ul></ul><ul><ul><li>Parameterize Web Servers dialog lists web servers used with a default Context Parameter Name </li></ul></ul><ul><ul><li>Can be changed using the Change button to change </li></ul></ul><ul><ul><ul><li>Web Server </li></ul></ul></ul><ul><ul><ul><li>Local ASP.NET Development Web Server </li></ul></ul></ul>
    28. 28. Editing a Web Test: Parameterizing Web Servers <ul><li>After changing, the Context Parameters node appears in the web test </li></ul><ul><li>Values can be edited via right click on Properties of newly added </li></ul><ul><ul><li>parametername=value </li></ul></ul><ul><li>Context Parameter can then be used in requests using </li></ul><ul><ul><li>{{..}} notation </li></ul></ul><ul><li>Example: {{WebServer6}}/live/search/search.xml </li></ul>
    29. 29. Editing Web Tests: Extraction Rules <ul><li>Data from POST/GET requests can be extracted for </li></ul><ul><ul><li>Subsequent requests </li></ul></ul><ul><ul><li>Providing debugging information </li></ul></ul><ul><li>Extraction rules verify that a Web application is working correctly by </li></ul><ul><ul><li>extracting data from the responses to Web requests </li></ul></ul><ul><ul><li>storing results in the test context as name value pairs. </li></ul></ul><ul><li>Extraction rules can extract </li></ul><ul><ul><li>form fields </li></ul></ul><ul><ul><li>Text </li></ul></ul><ul><ul><li>Attributes </li></ul></ul><ul><ul><li>Headers </li></ul></ul><ul><ul><li>regular expressions </li></ul></ul><ul><ul><li>hidden fields. </li></ul></ul>
    30. 30. Editing Web Tests: Extraction Rules <ul><li>To Extract, right-click on a request and choose Add Extraction Rule </li></ul><ul><li>Extraction rules define what data is to be extracted from an HTTP response and store the data in context parameters </li></ul><ul><li>Dynamic data generated via requests can be passed down to later requests. </li></ul>
    31. 31. Editing Web Tests: Extraction Rules
    32. 32. Editing Web Tests: Extraction Rules <ul><li>To add Extraction Rule: </li></ul><ul><ul><li>Right-click on request </li></ul></ul><ul><ul><li>Choose Add Extraction Rule </li></ul></ul><ul><ul><li>Modify/add parameters </li></ul></ul><ul><ul><li>Set Context Parameter to a unique name </li></ul></ul>
    33. 33. Annoying Error Messages!! <ul><li>RequestFailed: Context parameter '$HIDDEN1.__VIEWSTATE' not found in test context ”. </li></ul><ul><li>Add Extract Hidden Fields </li></ul>
    34. 34. Annoying Error Messages!! <ul><li>Web Test ran flawlessly right after recording but Next Morning? </li></ul><ul><li>500 Server Error </li></ul><ul><li>Search for parameters you think may be dynamic (Session Variable) </li></ul><ul><li>Add Extract Text Rule </li></ul><ul><li>Example: Context Parameter Name = ControlID, Ends With = &, HTMLDecode = True, Ignore Case = False, Index = 0, Required = True, Starts With = ControlID =, Use Regular Expression = false. </li></ul>
    35. 35. Editing Web Tests: Validation Rules <ul><li>Validation rules validate existence of </li></ul><ul><ul><li>Text </li></ul></ul><ul><ul><li>tags, </li></ul></ul><ul><ul><li>or attributes </li></ul></ul><ul><li>on the page returned by a request. </li></ul><ul><li>Validation rules also verify the amount of time it takes a request to finish, and the existence of form fields and their values. </li></ul>
    36. 36. Editing Web Tests: Validation Rules
    37. 37. Editing Web Tests: Validation Rules <ul><li>To add a validation rule: </li></ul><ul><ul><li>Select a request </li></ul></ul><ul><ul><li>Right-click </li></ul></ul><ul><ul><li>Add Validation rules in dialog </li></ul></ul><ul><li>Validation Level: </li></ul><ul><ul><li>Used only during a load test </li></ul></ul><ul><ul><li>Higher validation levels effect speed, hence slower tests </li></ul></ul><ul><ul><li>Does not mean priority </li></ul></ul><ul><ul><li>Determines when the validation rule is used in a load test. </li></ul></ul><ul><ul><li>Setting to High means that the rule is executed only when the load test validation level is set to high. </li></ul></ul>
    38. 38. Editing Web Tests: Validation Rules <ul><li>Validation Levels: </li></ul><ul><ul><li>Used only during a load test </li></ul></ul><ul><ul><li>Higher validation levels means slower tests </li></ul></ul><ul><ul><li>Does not mean priority </li></ul></ul><ul><ul><li>Determines when the validation rule is used in a load test. </li></ul></ul><ul><ul><li>Setting to High means that the rule is executed only when the load test validation level is set to high. </li></ul></ul>
    39. 39. Running Web Tests <ul><li>Settings can be configured from .testrunconfig file </li></ul><ul><li>Choose Web Test from dialog: </li></ul><ul><ul><li>Number of iterations </li></ul></ul><ul><ul><li>Browser Type </li></ul></ul><ul><ul><li>Network Type </li></ul></ul><ul><ul><li>Simulate Think Times </li></ul></ul><ul><li>These settings are overridden when run under a Load Test </li></ul>
    40. 40. Running Web Tests: <ul><li>From the tool bar: </li></ul><ul><ul><li>Run Test </li></ul></ul><ul><li>From the command line </li></ul><ul><ul><li>Invoke MSTEST </li></ul></ul>
    41. 41. Interpreting Web Test Results <ul><li>Results Viewer: </li></ul><ul><ul><li>Results Panel: </li></ul></ul><ul><ul><ul><li>Request: The full URL requested </li></ul></ul></ul><ul><ul><ul><li>HTTP Status: HTTP status returned from the server – typically 200 OK </li></ul></ul></ul><ul><ul><ul><li>Response Time: Time web server took to respond </li></ul></ul></ul><ul><ul><ul><li>Size: Size of response </li></ul></ul></ul>
    42. 42. Interpreting Web Test Results <ul><li>Details Panel: </li></ul><ul><ul><li>Web Browser Tab: Response rendered as browser page </li></ul></ul><ul><ul><li>Request: Contents of the selected request </li></ul></ul><ul><ul><li>Response: Contents of the response to selected request </li></ul></ul><ul><ul><li>Context: Current context parameters, useful for debugging extraction rules </li></ul></ul><ul><ul><li>Details: Results of extraction and validation rules for selected request. </li></ul></ul>
    43. 43. Coded Web Tests <ul><li>Written in C# or Visual Basic </li></ul><ul><li>Incorporates flow of control as opposed to sequential recorded tests </li></ul><ul><li>Use Recorded tests for baseline and then convert: </li></ul><ul><ul><li>Select web test </li></ul></ul><ul><ul><li>Right-click </li></ul></ul><ul><ul><li>Generate Code </li></ul></ul>
    44. 44. Why Coded Web Tests? <ul><li>Can read expected results from a data source </li></ul><ul><li>Flexibility of conditionals and looping </li></ul><ul><li>Copy set of request from one test to another </li></ul><ul><li>Factor out sections of requests and other operation into methods that any test can call </li></ul>
    45. 45. AJAX in Web Tests <ul><li>VSTS 2008 now records AJAX requests </li></ul><ul><li>Freeware Fiddler need not be used, although it’s still useful for diagnosing </li></ul><ul><ul><li>See: http:// /fiddler/ </li></ul></ul>
    46. 46. Test Case Management <ul><li>Test List Editor </li></ul><ul><ul><li>New Test List per release/project/cycle </li></ul></ul><ul><ul><li>Properties>Associated Work Items </li></ul></ul><ul><li>Run Test </li></ul><ul><ul><li>Run one or multiple tests </li></ul></ul><ul><ul><li>Debug tests </li></ul></ul>
    47. 47. Test Results Window <ul><li>Run/Debug </li></ul><ul><li>Pause/Stop Run </li></ul><ul><li>Import/Export Results </li></ul><ul><li>Group results by </li></ul>
    48. 48. LOAD TESTS <ul><li>Step 1: Identify Objectives. </li></ul><ul><li>Step 2: Identify Key Scenarios. </li></ul><ul><li>Step 3: Identify Workload. </li></ul><ul><li>Step 4: Identify Metrics. </li></ul><ul><li>Step 5: Create Test Cases. </li></ul><ul><li>Step 6: Simulate Load. </li></ul><ul><li>Step 7: Analyze the Results. </li></ul>
    49. 49. Understanding Load Test <ul><li>Primary goal of a Load Test is to simulate many users accessing server at the same time </li></ul><ul><li>By adding Web Tests to a Load Test you can, </li></ul><ul><ul><li>Simulate multiple users opening simultaneous connections to a server </li></ul></ul><ul><ul><li>Make multiple HTTP requests </li></ul></ul><ul><ul><li>Set other properties that apply to individual Web Tests </li></ul></ul>
    50. 50. Understanding Load Test Continues.. <ul><li>Load Tests are used in several different types of testing: </li></ul><ul><li>Smoke: How your application performs under light loads for short duration </li></ul><ul><li>Stress: To determine if the application will run successfully for a sustained duration under heavy load </li></ul><ul><li>Performance: To determine how responsive your application is </li></ul><ul><li>Capacity: To determine how many users and/or transactions a given system will support and still meet performance goals </li></ul>
    51. 51. Identify Objectives <ul><li>Write down the performance objectives for your application. </li></ul><ul><ul><li>Response time . For example, the product catalog must be displayed in less than 3 seconds. </li></ul></ul><ul><ul><li>Throughput . For example, the system must support 100 requests per second. </li></ul></ul><ul><ul><li>Resource utilization . A frequently overlooked aspect is how much resource your application is consuming, in terms of CPU, memory, disk I/O, and network I/O. </li></ul></ul><ul><ul><li>Maximum User Load . Determining how many maximum users can run on a specific hardware configuration </li></ul></ul>
    52. 52. Identify Key Scenarios <ul><li>What are scenarios? </li></ul><ul><ul><li>Scenarios are anticipated user paths that generally incorporate multiple application activities. </li></ul></ul><ul><li>How do you identify scenarios? </li></ul><ul><ul><li>Key scenarios are those for which you have specific performance goals or those that have a significant performance impact. </li></ul></ul><ul><li>For example: </li></ul><ul><ul><li>Login to the site. </li></ul></ul><ul><ul><li>Browse albums. </li></ul></ul><ul><ul><li>Register to the site. </li></ul></ul>
    53. 53. Identify the workload <ul><li>Identify the distribution </li></ul><ul><ul><li>IIS Logs (Exist). </li></ul></ul><ul><ul><li>Research (Not exist). </li></ul></ul><ul><li>Identify the user loads </li></ul><ul><ul><li>What are the max expected </li></ul></ul><ul><ul><li>concurrent users? </li></ul></ul>
    54. 54. Identify Metrics <ul><li>Metrics provide information about how close your application is to your performance objectives. </li></ul><ul><li>Metrics help you identify problem areas and bottlenecks. </li></ul><ul><li>Network-specific metrics. </li></ul><ul><li>System-related metrics. </li></ul><ul><li>Platform-specific metrics. </li></ul><ul><li>Application-specific metrics. </li></ul>
    55. 55. Create Load Test Cases <ul><li>What is a Load test case? </li></ul><ul><ul><li>An group of activities involved in a scenario. </li></ul></ul><ul><ul><li>For example: Place an Order. </li></ul></ul><ul><li>The test cases are created based on the scenarios and the profile mix identified in the previous steps. </li></ul><ul><li>Each test case should mention the expected results in such a way that each test case can be marked as a pass or fail after execution. </li></ul>
    56. 56. Performance Test Cases <ul><li>Load Test Case example: </li></ul><ul><li>Expected Results example: </li></ul>
    57. 57. VS Performance Test <ul><li>Load patterns and Real world test analogy: </li></ul><ul><ul><li>Constant pattern  Load test, Stress test </li></ul></ul><ul><ul><li>Step pattern  Compatibility test, Performance test, Benchmarks </li></ul></ul><ul><ul><li>Goal based pattern  Stress test , Capacity test </li></ul></ul>
    58. 58. Load Test Life Cycle
    59. 59. Demo <ul><li>Add a blank web test </li></ul><ul><li>Call web test from another web test (Login and LinkToLos) </li></ul><ul><li>Data binding-csv-LoginPage </li></ul><ul><li>Run WebTest once then edit run settings to run per row </li></ul><ul><li>Validation rule passing </li></ul><ul><li>Show Load Test setup and run </li></ul><ul><li>Analyze LoadTest Result </li></ul>
    60. 60. Control Load Modeling <ul><li>Load Tests now offer additional load-modeling options that enable us to create load tests that more accurately model the expected real-world usage of an application: </li></ul><ul><li>Number of tests run </li></ul><ul><ul><li>Determines which test is run when a virtual user starts a iteration </li></ul></ul><ul><ul><li>Follow this model when you are basing test mix on transaction percentages in an IIS log or production data </li></ul></ul>
    61. 61. Control Load Modeling continues.. <ul><li>The amount of time spent on each test </li></ul><ul><ul><li>Determines the percentage of virtual users who will run a particular test </li></ul></ul><ul><ul><li>Follow this model when you are basing the test mix on the percentage of users running particular test </li></ul></ul><ul><li>The pace/speed at which the users run the tests </li></ul><ul><ul><li>Each test is run the specified number of times per user per hour </li></ul></ul><ul><ul><li>Follow this model when you want virtual users to run tests at a certain pace throughout the load test </li></ul></ul>
    62. 62. How should the test mix be modeled
    63. 63. Improved Load Test Analyzer Views <ul><li>New Summary View with key indicators in a single page </li></ul><ul><li>Four new built-in graphs display key information at the same time </li></ul><ul><li>Easily accessed table view </li></ul>
    64. 64. Load Tests Summary <ul><li>Test Run Information </li></ul><ul><ul><li>Name, Description, Start/End times, Controller </li></ul></ul><ul><li>Overall Results </li></ul><ul><ul><li>Number of request/sec </li></ul></ul><ul><ul><li>Number of failed requests </li></ul></ul><ul><ul><li>Average response time </li></ul></ul><ul><ul><li>Average page time </li></ul></ul>
    65. 65. Load Test Summary Continues… <ul><li>Key Statistics: Top 5 Slowest Pages </li></ul><ul><ul><li>URL (Can click the link to see details) </li></ul></ul><ul><ul><li>and average page load time </li></ul></ul><ul><li>Key Statistics: Top 5 Slowest Tests </li></ul><ul><ul><li>Test name (Can click the link to see details) </li></ul></ul><ul><ul><li>Average test time </li></ul></ul><ul><li>Key Statistics: Top 5 Slowest SQL operation </li></ul><ul><ul><li>Name of the operation (Can click the link to see details) </li></ul></ul><ul><ul><li>Duration in Microseconds </li></ul></ul>
    66. 66. Load Tests Summary Continues.. <ul><li>Test Results </li></ul><ul><ul><li>List of all tests and scenarios </li></ul></ul><ul><ul><li>Number of time each scenario ran </li></ul></ul><ul><ul><li>Number of times it failed </li></ul></ul><ul><ul><li>Average test time </li></ul></ul>
    67. 67. Load Tests Summary Continues.. <ul><li>Page Results </li></ul><ul><ul><li>List of all web pages in the load test </li></ul></ul><ul><ul><li>Total count of requests made for the web page </li></ul></ul><ul><ul><li>Average page time </li></ul></ul>
    68. 68. Load Test Summary Continues.. <ul><li>Transaction Results </li></ul><ul><ul><li>NOT A DATABASE TRANSACTION </li></ul></ul><ul><ul><li>Web Test Transaction </li></ul></ul><ul><ul><li>List of all the transactions in the Load Test </li></ul></ul><ul><ul><li>Response Time </li></ul></ul><ul><ul><li>Elapsed Time </li></ul></ul><ul><ul><li>Total Counts </li></ul></ul>
    69. 69. Load Test Summary Continues… <ul><li>Controller and Agent Resources </li></ul><ul><ul><li>Contains list of computers that are used to run the test </li></ul></ul><ul><ul><li>% processor time </li></ul></ul><ul><ul><li>Available memory at the end of test run </li></ul></ul>
    70. 70. Load Test Summary Continues… <ul><li>System Under Test Resources </li></ul><ul><ul><li>List of computers that are the set of target computers for which load is being generated </li></ul></ul><ul><ul><li>Includes any computer from which you collect counter sets other than Agent or Controller. </li></ul></ul>
    71. 71. Load Test Summary Continues… <ul><li>Errors </li></ul><ul><ul><li>List of all errors </li></ul></ul><ul><ul><ul><li>Type i.e. HttpEerror </li></ul></ul></ul><ul><ul><ul><li>Sub Type i.e. LoadTestException </li></ul></ul></ul><ul><ul><li>Error count </li></ul></ul><ul><ul><ul><li>Number of each error type </li></ul></ul></ul><ul><ul><li>Error message i.e. 404-NotFound </li></ul></ul>
    72. 73. Graphs View
    73. 74. Table View <ul><li>Errors-Displays a list of errors that occurred during the load test run </li></ul><ul><li>Pages-Displays a list of pages accessed during a load test run </li></ul><ul><li>Requests-Displays details for individual requests issued during a load test </li></ul><ul><li>SQL Trace-Displays the results of SQL tracing only if SQL tracing was enabled with right connection string </li></ul><ul><li>Tests-Displays details for individual tests run during a load test </li></ul><ul><li>Thresholds-Displays a list of threshold rule violations that occurred during a load </li></ul><ul><li>Transactions-Displays a list of transactions that occurred during a load test run </li></ul>
    74. 75. Load Test Result Repository Management <ul><li>Information gathered during a Load Test run is stored in the Result Repository </li></ul><ul><li>Repository contains performance counter data and error data </li></ul><ul><li>You can manage your load result from the Load test editor </li></ul><ul><ul><li>Open </li></ul></ul><ul><ul><li>Import </li></ul></ul><ul><ul><li>Export </li></ul></ul><ul><ul><li>Remove </li></ul></ul><ul><ul><li>You do not have to go the dbase to clean up the repository </li></ul></ul>
    75. 76. Defects Tracking Using TFS
    76. 77. Defects Tracking Using TFS Continues..
    77. 78. Reporting Using TFS—Remaining Work Items
    78. 79. Reporting Using TFS—Bug Rates
    79. 80. References <ul><li> </li></ul><ul><li> </li></ul><ul><li> </li></ul>