Website performance testing simplified!

Syed Aslam Basha here from Information Security Tools team.

This blog post gives information about identifying, creating performance testing strategy along with implementation using Visual studio (VS) 2008. I would not be covering as “what is meant by” concepts of performance testing but how to part of it.

First and foremost challenge you could face while starting performance testing is

- Identifying the goals/Scenarios for performance testing: For example it could be,

  • Concurrency test scenario: Monitor the performance of the website for total of 100 concurrent users performing operations New Enrolment, Change My Enrolment and Un-registration
  • Scalability test scenario: Website should be scalable for 5000 users performing New Enrolment operation

- Requirements to be met to pass the performance testing criteria: For example it could be, 

  • Response time of the web pages should be <= 5 sec
  • For reports response time should be <= 15 sec

You need to get the above details defined from business/Program manager before you proceed any further.

Performance testing for a website using VS would involve the following steps:

  • Create web test
  • Customize the web test (data binding, validation rules..,)
  • Run the web test and fix errors if it has
  • Create load test
  • Configure web test and load test scripts
  • Run the load test
  • Analyze the results

Lets go through each step in detail.

  • Create web test
    • Open the Visual studio team system and create a test project
    • Add web test
    • Type the URL of the application
    • Record the scenario which you want to load test. In the left pane you can see the URL’s being recorded
    • Once you are done with recording the scenario stop the recording
    • You can see the URL’s (get and post requests) it has recorded
  • Customize the web test
    • In this section you would data bind users, create validation rules, set the response time goal for each link, set the think time.,
  • Run the web test and fix errors if it has any
  • Create load test
    • Add load test
    • Give name of the scenario
    • Click on next
    • Select scenarios (scripts) click on next
    • Select network type click on next
    • Enter constant load of 100 (you can give ramp up if you want)
    • Add IIS and DB server name
    • Finish
  • Configure web test and load test scripts
    • Configuration for web test scripts:
      • Response time goal of 5 seconds for each page
    • Configuration of Load test scripts:
      • Scenario1: 100 concurrent users
        • Constant load pattern: 100 users
        • Run duration: 20 minutes
        • Web test connection model: Connection per user
        • Web test: one row per data source
      • Scenario2: Scalability
        • Constant load pattern: 25 users
        • Run duration:  480 minutes
        • Web test connection model: Connection per user
        • Web test: one row per data source
        • Uncheck test time outs settings
  • Run the load test
  • Analyze the results (samples summary result documents attached below)
  • Important statistics for us:
    • Response time for each page should be < 5 seconds
    • Web Server Processor usage < 70%
    • Web Server Available MB >128 MB
    • DB Server Processor usage < 70%
    • DB Server Available MB >128 MB

Finally use code profiler to identify the functions which are taking lot of time and memory.

-Syed Aslam Basha ( syedab@microsoft.com )

Microsoft Information Security Tools (IST) Team

Test Lead

---------------------------------------------------------

Please leave a comment if the blog post has helped you.

PerformanceTestSummaryConcurrency.xls

Comments

  • Anonymous
    October 13, 2010
    This blog is really very helpful for performance Testing, Thanks Syed

  • Anonymous
    December 15, 2010
    Thanks a lot Syed Aslam, very useful blog, it is explained better than in the book i bought from Packt publications.

  • Anonymous
    December 12, 2011
    Good one