Active TopicsActive Topics  Display List of Forum MembersMemberlist  CalendarCalendar  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin


 One Stop Testing ForumTypes Of Software Testing @ OneStopTestingPerformance & Load Testing @ OneStopTesting

Message Icon Topic: How do you define performance/load/stress testing?

Post Reply Post New Topic
Author Message
rose
Moderator Group
Moderator Group
Avatar

Joined: 31Jan2007
Online Status: Offline
Posts: 21
Quote rose Replybullet Topic: How do you define performance/load/stress testing?
    Posted: 09Feb2007 at 12:25pm
 
How do you define performance/load/stress testing?
 
 
How do you define performance/load/stress testing? Many times people use these terms interchangeably, but they have in fact quite different meanings.
 
Performance testing
 
The goal of performance testing is not to find bugs, but to eliminate bottlenecks and establish a baseline for future regression testing. To conduct performance testing is to engage in a carefully controlled process of measurement and analysis. Ideally, the software under test is already stable enough so that this process can proceed smoothly.

A clearly defined set of expectations is essential for meaningful performance testing. If you don't know where you want to go in terms of the performance of the system, then it matters little which direction you take. For example, for a Web application, you need to know at least two things:
 
  • expected load in terms of concurrent users or HTTP connections
  • acceptable response time
  • Once you know where you want to be, you can start on your way there by constantly increasing the load on the system while looking for bottlenecks. To take again the example of a Web application, these bottlenecks can exist at multiple levels, and to pinpoint them you can use a variety of tools:

    • at the application level, developers can use profilers to spot inefficiencies in their code (for example poor search algorithms)
    • at the database level, developers and DBAs can use database-specific profilers and query optimizers
    • at the operating system level, system engineers can use utilities such as top, vmstat, iostat (on Unix-type systems) and PerfMon (on Windows) to monitor hardware resources such as CPU, memory, swap, disk I/O; specialized kernel monitoring software can also be used
    • at the network level, network engineers can use packet sniffers such as tcpdump, network protocol analyzers such as ethereal, and various utilities such as netstat, MRTG, ntop, mii-tool

    From a testing point of view, the activities described above all take a white-box approach, where the system is inspected and monitored "from the inside out" and from a variety of angles. Measurements are taken and analyzed, and as a result, tuning is done.

    However, testers also take a black-box approach in running the load tests against the system under test. For a Web application, testers will use tools that simulate concurrent users/HTTP connections and measure response times.

    When the results of the load test indicate that performance of the system does not meet its expected goals, it is time for tuning, starting with the application and the database. You want to make sure your code runs as efficiently as possible and your database is optimized on a given OS/hardware configurations.
     
    If, after tuning the application and the database, the system still doesn't meet its expected goals in terms of performance, a wide array of tuning procedures is available at the all the levels discussed before.
     
    Performance tuning can sometimes be more art than science, due to the sheer complexity of the systems involved in a modern Web application. Care must be taken to modify one variable at a time and redo the measurements, otherwise multiple changes can have subtle interactions that are hard to qualify and repeat.

    In a standard test environment such as a test lab, it will not always be possible to replicate the production server configuration. In such cases, a staging environment is used which is a subset of the production environment. The expected performance of the system needs to be scaled down accordingly.

    The cycle "run load test->measure performance->tune system" is repeated until the system under test achieves the expected levels of performance. At this point, testers have a baseline for how the system behaves under normal conditions. This baseline can then be used in regression tests to gauge how well a new version of the software performs.
     
    Load testing

    We have already seen load testing as part of the process of performance testing and tuning. In that context, it meant constantly increasing the load on the system via automated tools. For a Web application, the load is defined in terms of concurrent users or HTTP connections.
    In the testing literature, the term "load testing" is usually defined as the process of exercising the system under test by feeding it the largest tasks it can operate with. Load testing is sometimes called volume testing, or longevity/endurance testing.

    Examples of volume testing:
    • testing a word processor by editing a very large document
    • testing a printer by sending it a very large job
    • testing a mail server with thousands of users mailboxes
    • a specific case of volume testing is zero-volume testing, where the system is fed empty tasks
    Examples of longevity/endurance testing:
    • testing a client-server application by running the client in a loop against the server over an extended period of time
    Goals of load testing:
    • expose bugs that do not surface in cursory testing, such as memory management bugs, memory leaks, buffer overflows, etc.
    • ensure that the application meets the performance baseline established during performance testing. This is done by running regression tests against the application at a specified maximum load.
    Although performance testing and load testing can seem similar, their goals are different. On one hand, performance testing uses load testing techniques and tools for measurement and benchmarking purposes and uses various load levels. On the other hand, load testing operates at a predefined load level, usually the highest load that the system can accept while still functioning properly. Note that load testing does not aim to break the system by overwhelming it, but instead tries to keep the system constantly humming like a well-oiled machine.

    Stress testing

    Stress testing tries to break the system under test by overwhelming its resources or by taking resources away from it (in which case it is sometimes called negative testing). The main purpose behind this madness is to make sure that the system fails and recovers gracefully -- this quality is known as recoverability.

    Where performance testing demands a controlled environment and repeatable measurements, stress testing joyfully induces chaos and unpredictability. To take again the example of a Web application, here are some ways in which stress can be applied to the system:
    • double the baseline number for concurrent users/HTTP connections
    • randomly shut down and restart ports on the network switches/routers that connect the servers (via SNMP commands for example)
    • take the database offline, then restart it
    • rebuild a RAID array while the system is running
    • run processes that consume resources (CPU, memory, disk, network) on the Web and database servers

     


     
     
     

     



    Post Resume: Click here to Upload your Resume & Apply for Jobs

    IP IP Logged
    Post Reply Post New Topic
    Printable version Printable version

    Forum Jump
    You cannot post new topics in this forum
    You cannot reply to topics in this forum
    You cannot delete your posts in this forum
    You cannot edit your posts in this forum
    You cannot create polls in this forum
    You cannot vote in polls in this forum



    This page was generated in 0.094 seconds.
    Vyom is an ISO 9001:2000 Certified Organization

    © Vyom Technosoft Pvt. Ltd. All Rights Reserved.

    Privacy Policy | Terms and Conditions
    Job Interview Questions | Placement Papers | Free SMS | Freshers Jobs | MBA Forum | Learn SAP | Web Hosting