This documentation is archived and is not being maintained.

Global Bank: Testing the New Service and Fixing Issues

Visual Studio 2008

Visual Studio Team System 2008 makes it easier than ever to test applications and Web sites with new load modeling options, improved Load Test Analyzer views, and enhanced Load Test Results Repository management. This is the fifth and final article in a series that describes a common development scenario at the fictitious Global Bank. These articles show you how you can use Visual Studio Team System for your next project. If you're new to the series, you can meet the Global Bank team by reading the introductory article Global Bank: A Scenario for Visual Studio Team System 2008.

Ellen is a self-taught tester. She has been at Global Bank for over eight years, spending most of the last three years testing the Global Bank Web site. Ellen can read code written in C++ and C#, but she does not write much code as part of her job. She has Visual Studio Team System 2008 Test Edition installed on her production computer.

Ellen reviews the work item assigned to her about the new Web service and then synchronizes her test computer to the CDService project. Ellen selects CDServiceTestProject in Solution Explorer and launches the Add New Test dialog box. Ellen creates a new Web test to exercise CDService and test performance.

In the Web Test Recorder, she enters the URL for the CDService part of the Global Bank Web site. In the Web browser window, Ellen clicks through the new CDService to simulate how a typical customer would purchase a new CD. When Ellen is done recording, she reviews the new Web test in the Web Test Editor. Ellen then creates additional Web tests to simulate how customers view existing CDs, as well as other common usage scenarios.

Now that Ellen has created tests for the new CDService functionality, she wants to expand her testing to see if CDService meets performance expectations. Ellen opens the Add New Test dialog box and chooses Load Test. She names the new test CDService.loadtest.

In the New Load Test Wizard, she chooses the browsers and the network connection types to test against, and the number of users, among other options. Ellen also adds the Web tests she has created for CDService to the load test.

In the Load Test Editor, Ellen reviews the load test she created. She then clicks Run Test. When the Load Test is complete, Ellen chooses to view the detailed results in the load test results store. In Load Test Analyzer, she looks through the results and notes several errors, which she will need to report to the developer.

To find out more information, Ellen right-clicks each exception in Errors view and chooses Errors on the shortcut menu. In the Load Test Errors dialog box, she looks through the data in the Error Stack Trace and Error Details dialog boxes. After she has finished investigating the issues, she is ready to create a work item for Martin.

Figure 1: Load Test Results

Globa lBank Load Test Results

In Load Test Editor, Ellen clicks the Create Performance Session for this Test button. She uses the Performance Wizard to create an instrumented performance session for the load test. In Performance Explorer, Ellen clicks Launch with Profiling to generate a performance report for the load test.

Ellen opens a work item for Martin, the developer, to fix the errors and attaches the performance report file to the work item for him to review. Ellen saves and checks in all of her changes to the test project.

Martin sees that he has a new work item logged against him by Ellen. He opens the work item and then saves the attached .vsp file to his development computer. On the Analyze menu, Martin clicks Compare Performance Reports. He selects the last performance report he generated when coding CDService as the baseline file and the load test performance report as the comparison file.

Martin uses the Comparison Report window to review the differences in the performance reports. Martin identifies the performance problems and makes the necessary fixes in the code. He then re-runs both performance sessions to verify the fix. Martin changes the status of the work item to Resolved as Fixed and saves the work item.

Ellen looks in the work item database and sees that the work item she had opened against Martin has been fixed. She synchronizes her test computer to the CDService project and then runs CDService.loadtest. The load test completes without errors. Ellen reviews the load test results for new issues, and finding none, closes the work item.