Chapter 5. Web Performance Testing

This chapter concentrates on different ways of verifying website responses for each request and responses in multiple scenarios such as slow network speed, rendering on different browsers, or with different numbers of users at a given point in time. All these factors affect the website performance and response time. Web Performance Testing helps us verify if website produces the expected result within the expected response time. This helps us to identify the problems and rectify them before they happen in the actual production environment. Web Performance Testing also helps in finding out if the hardware can handle the maximum expected amount of requests at a time or needs additional hardware to handle the traffic and respond to multiple user requests.

Discussed here are some of the main testing highlights that are performed on web applications for better performance and availability:

  • Validation and verification test: It helps to verify the inputs or the expected entries that satisfy the requirements. For example, if a field requires a date to be entered, the system should check for the date validation and should not allow the user to submit the page until the correct entry is made.
  • Web page usability test: It is the method of simulating the user's way of experience the application in production, and testing the same as per requirement. This could be something like checking help links, contents in the page, checking menu options and their links, think times between the pages and message dialogs in the pages.
  • Security Testing: It helps us to verify the application response for different end users based on the credentials and different other resources required from the local system or a server in the network. For example, this could be writing/reading the log information file in the network share.
  • Performance Testing: It verifies web page responses as per expectations based on the environment. This also includes stress testing and Load Testing of the application with multiple user scenarios, and the volume of data that is explained in detail in the Chapter 7,
  • Testing web page compatibility: It is the method of testing multiple browsers based on user requirements. The web page presentation depends on how well the components are used and supported on all the different browsers that end users may choose.
  • Testing a web application using different networks: This is because of the user location that varies based on where the user is accessing the system from. The performance and the accessibility of the application are based directly on the network involved in providing the web pages to the user. This is also part of performance testing. For example, it could be a local intranet or an internet with a lower network speed.

There are many other types of testing that can be performed as part of Web Performance Testing such as using different operating systems, using different databases, or installing different versions of an operating system.

All these tests with many additional capabilities are supported by Microsoft Visual Studio 2010. Dynamic web pages can be created by any of the supported .NET languages by Visual Studio using the ASP.NET web project and web page templates. Custom services, components, and libraries are used in the web application to get the functionality and make it more dynamic. Other scripting languages and technologies such as JavaScript, Silverlight, and Flash are used in the web pages for validations and making the presentation better. Once we are ready with the web application, we need to test it and deploy it to check if the website functionalities and qualities are satisfied as per requirements. To get there, Microsoft Visual Studio 2010 provides tools for testing a web application. There are different ways of using the tool to test the application. One is to use the user interface to record and then add the validation rules and parameters to make it dynamic. The other way is to record the requests and then create the coded Web Performance Test for the recorded Web Performance Test and customize it using the code.

This chapter explains the basic means of Web Performance Testing using Visual Studio 2010 but also of using features such as adding rules and parameterization of dynamic variables. Microsoft Visual Studio 2010 provides many new features to Web Performance Testing such as adding new APIs to the test results, Web Performance Test results in a separate file, looping and branching, new validation and extraction rules, and many more. This chapter will provide detailed information on the following listed features:

  • Creating a new Web Performance Test
  • Web Performance Test Editor and properties
  • Web Requests properties, validations, and Transactions
  • Toolbar options and properties
  • Performance Session for Test
  • Debugging and Running Web Performance

Creating Web Performance Test

The Web Performance Test activates the web performance test recorder to record all the actions that are performed while browsing websites and adds it to the performance test. The recorder comes by default with Visual Studio Ultimate. Creating a performance Web Performance Test is similar to creating any other test in Visual Studio. There are three different ways to create a new web performance test:

  1. Select the test project, right click, and choose Add.
  2. Select the menu option Test and choose New Test… which opens the Add New Test window containing the different test type templates.
  3. Select the menu option Test and choose Windows and then select Test View, which opens the Test View window listing all available tests. Right-click on the surface of the Test View window to open the context menu. Choose the New Test option, which opens the Add New Test window.
  4. After selecting one of the above three, select the Web Performance Test template from the list of different test types.
Creating Web Performance Test

Once you select the Web Performance Test and click OK, a new test is created under the selected test project and a new instance of a web browser opens. The left-pane of the browser contains the Web Test Recorder for recording the user actions.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.133.128.39