Load Testing

Load Testing

Success of most web or database applications, specially the ones related to e-commerce highly depends on its performance and response time when multiple users access it simultaneously. An application with high response time and poor performance can lead to huge problems. Load Testing helps in identifying the performance problems before you deploy your application for end users. Load Testing helps you design and simulate usage traffic which can be used to test your application infrastructure for performance, reliability and scalability.

We will try to understand few important aspects with Load Testing. Following document will help you understand what Load Testing means, why its required and how you can successfully implement Load Testing for your Web applications, Database applications, Web services or Command Line applications using AppPerfect.

What is Load Testing?

Load Testing is a process to design and simulate usage traffic which can be used to test your application infrastructure for performance, reliability and scalability. It is a way to test the performance and scalability of your application with varying user load. Load testing involves simulating real-life user load for the target application, helping you determine how your application behaves when multiple users hits it simultaneously. Load testing with different load strategies and conditions helps you determine software design issues like incorrect concurrency/pooling mechanism, poor optimization, memory build-up, etc. enabling you to easily identify server configuration issues with Web server, application server, database server, load balancer, etc. It also helps you detect if your current infrastructure is sufficient to meet your user demand. Using Load Testing, you determine the peak user load your application can sustain, number of concurrent users your application can support, and whether or not your application will scale as more users access it.

Most developers face the following questions when designing a server-based multi-user system:

  • Do you know the number of concurrent users that your application can safely support?
  • Will your application scale as more users access it?
  • Do you know how long it would take a visitor to receive a page?
  • Do you know the load point where your server crashes?
  • Is your current hardware sufficient to meet your predicted demand? If no, what additional hardware would you need?

Load Testing can help you identify a variety of problems before you go into production:

  • Software design issues (incorrect concurrency/pooling mechanism, poor optimization, memory build-up, etc.)
  • Server configuration issues (Web server, application server, database server, load balancer, etc.)
  • Hardware limitation issues (Excessive disk I/O, CPU maximization, memory limitations, network bottleneck, etc.)

Automated Performance and Stress Test with AppPerfect

AppPerfect offers Load Testing solution in the form of AppPerfect Load Test. AppPerfect Load Test is a fully Automated Load test, Stress test and Performance Test solution that is easy to use and cost effective. AppPerfect Load Test is found to be most affordable, cost effective, efficient, reliable and accurate solution by its customers. AppPerfect Load Test is easy to use with no programming required.< It provides a unique view of the target machine with integrated load testing, stress testing and performance testing parameters such as response time and hit count along with monitoring of system resources such as CPU, disk, network and memory.

AppPerfect Load Test Supports load testing for Web Applications (HTTP/HTTPS protocol), Database Applications (JDBC Protocol). Web Services (SOAP protocol) and any Command line Application (CLI)

We will now try to understand how you can successfully implement Load Testing for your application using AppPerfect Load Test.

Designing Test Scripts for Load Testing :

One of the important aspect in successfully implementing Load Testing is designing the test cases. Before recording your test scripts you should be ready with the Test Plan for same. You should have the list of modules documented which you would like to test in your application. Once you have figured out the modules to test, pick each module and list down the features to test for that module, Once you have identified the features, design test cases for each of the feature to test. For each of the test case, define the data set with which you will like to parameterize your test case. Also define the validations you will like to perform for your test case.

Once you are ready with the test plan, you can start creating Test Scripts for each of the identified modules.

  1. Creating new project is an easy one step process. Just start AppPerfect Load Test product and select File -> New.. menu option to create a New Load Testing project. For details on New Project creation refer to Creating a New Project chapter. For details on configuring project properties refer to Setting Project Properties chapter.
  2. Load test script consists of a number of "Action Groups". A Action Group is a logical unit for combining actions inside a test. By default, three Groups are created: Starting Group, Action Group1 and Ending Group. Depending on your desired behavior, you may wish to move initialization related tasks into the Starting Group (e.g. login tasks) and move clean up related tasks into the Ending Group (e.g. logout tasks). All the other tasks related to different features/actions in your application should be kept in different Action groups. The order of execution of test is Starting Group, Action Group(s), Ending Group.
  3. You can now start creating Action Groups for each of the feature you have identified in the current module under test. To create a new Action Group just select Project Node in the Editor tree, and right click and select the option.Add Group... from the popup menu. Provide descriptive name for the group clearly stating what feature this group is going to implement. You can also select the type of Action Group defining the type of application you are trying to load test. It could be any of HTTP (Web Application), JDBC (Database application), SOAP (Web Services) or CLI (Command line applications).
  4. This way you can functionally structure your test scripts where each test project will represent one functional module for your application and each Group in the Test Project will represent one test case or a feature in the module to test. Properly grouping test cases in different groups will help increase re-usability of groups across different test scripts. In case some of the actions are common and are needed in new test scripts, you can just link or import already existing groups instead of re-recording them all over again in new scripts. For details on Linking / Importing Groups refer to Link Projects chapter.

Support for Multiple Load Strategies :

You can create various load testing scenarios for your applications through the Load Strategies provided by AppPerfect Load Test. There are six load strategies you can choose from. With a combination of Run Duration and Load Strategy, you can create various scenarios for testing the load that your web / database application can bear. You can also use load strategies to indicate the breaking point of your applications.
For details on various Load Strategies refer to Load Strategies chapter.
Select Project -> Properties... menu option and refer to Load Generator Settings tab. Here you can configure the Load Strategy which best suits your requirement.

Load Testing : Load Generator Settings

Support for Server Monitoring :

You can monitor System resources of your remote Web / Database Server and see how your server performs while your application is getting stressed. Server Monitoring will provide CPU usage, Network I/O, Disk I/O, Memory statistics during the execution of the test. This is helpful in determining if system resources on your Server Machine are adequate to support the desired load. AppPerfect uses agentless architecture to monitor remote server resources, meaning it does not require any service or agent to run on remote machine. It uses existing system services to fetch the system monitoring information from remote machine. AppPerfect can monitor Windows 2000/XP/Vista/Windows 7, Linux x86, Solaris Sparc, MAC OSX and AIX based servers.
Select Project -> Properties... menu option and refer to Server Monitoring tab. Here you can configure the Remote Server settings which you need to monitor.

Load Testing : Server Monitoring

Distributed Load Testing :

AppPerfect's Load Testing solution allows you to distribute your test over multiple machines to simulate real-world conditions while testing web or intranet sites, client-server and other multi-tier applications. Testers can easily configure the list of machines on which Test Script should be executed. Load Testing results from all machines are accumulated into a single report for easier analysis.
To configure execution of load test on multiple machines select Project -> Properties menu option. It will launch the Project Properties wizard. Select the "Distributed Testing" step where you can configure to run Test script simultaneously on multiple machines. Distributed testing is performed using Load Test service running on the remote machines. Hence, you need to have AppPerfect Load Test installed on all the machines where you desire to execute the test. Load Test uses HTTP protocol to connect to Load Test service on remote machine. To connect to this service, you need to select Protocol (Default is http), provide Host name or IP address of the remote machine, port on which service is listening (Default is 8854) and Context Path (Default is AppService). Normally, you will need to specify only the host name or IP address of remote machine and other fields will take only the default values. Refer to Distributed Load Testing chapter for detailed instructions.

Load Testing : Distributed Testing

Test Execution with detailed Result Analysis :

Once the test is completely designed you can execute it to Load or stress test your application with different load strategies as per your requirement. AppPerfect generates extensive reports for each virtual user and task. To replay the test select the Project -> Run.. menu option. AppPerfect will start specified virtual users simultaneously based on the selected Load Strategy. and each virtual user will execute the recorded tasks in automated manner. At the end of test execution you can view the detailed results for each of the virtual user and export them to HTML, PDF etc. formats. In case of failure, you can pass on these exported reports to your development team for further analysis. For more details on Test Execution Results refer to Understanding Test Results chapter.

Load Testing can Run Unattended in Automated Manner:

With AppPerfect's Load Testing solution you can run complex and lengthy tests unattended. Tests can be scheduled to run overnight and engineers can analyze the results of execution next morning. As a result you save time and improve efficiency and can concentrate on other important tasks while scheduled tests run in background. To schedule tests you require AppPerfect Test Manager product. Once you have Test Manager installed you need to first configure Load Test to enable connection to Test Manager server. To configure the Test Manager connection select Tools -> Options -> Server Connections -> Test Manager Settings and provide the host:port information for the machine where Test Manager is installed. Once you have connection configured you can save the Load Test Project to Test Manager using File -> Export to Test Manager menu option. Once test is saved to Test Manager you can schedule Test Execution using Tools -> Schedule Project menu option.

Test Scheduler

For details on creating and executing Test Schedules using Test Manager Web-UI refer to Schedules chapter.

Load Testing with Team Sharing Support:

Test Engineers can share the load test scripts and results with different members in the team. Load Test results can be shared with developers which they can use to analyze application's performance with varying load. AppPerfect supports integration with Subversion (SVN) version control system. For details on integration with Subversion server refer to Team Server Configuration chapter.

IDE Integration Support:

IDE Integration is a highly useful feature in AppPerfect products. Once product is integrated in IDE you can start IDE and can execute Load Testing of your Web / Database / Web Services Projects from within IDE. You can integrate AppPerfect applications with Eclipse, IBM Rational Application Developer (RAD), NetBeans, IntelliJ Idea, JBuilder, Oracle JDeveloper and BEA Workshop studio.
Select Tools -> IDE Integration menu option to integrate with any of the supported IDEs. For details on integration with IDE refer to IDE Integration chapter.

IDE Integration

Integrate Load Testing with your Daily Build Process with ANT Script and Command line Support:

AppPerfect supports integration with build process smoothly. You just need to export Load Test project as ANT Script or Command Line script and then you can execute these exported scripts from your build process. This way you can ensure that each build is Load tested before final deployment. To Export project as Ant Script select Tools -> Export Project as ANT Script... menu option. For details on ANT script execution refer to ANT Script Execution chapter.

Ant Script Export

Conclusion :

Load Testing helps you design and simulate usage traffic which can be used to test your application infrastructure for performance, reliability and scalability. Once a test case is recorded it can be played back multiple times with different data sets. Its possible to validate output with different data inputs using the same test case by parameterizing the user input. Moreover tests once recorded can be reused and extended to cover more features and test cases as your application evolves,
AppPerfect's Load Testing solution is platform independent. Load Tests recorded on one platform can be executed over different operating systems and hardware configuration. AppPerfect Load Test is found to be most affordable, cost effective, efficient, reliable and accurate Load Testing solution by its customers. In case you have not yet tried AppPerfect Load Test, Download Now and give it a try today.

We use cookies for analytics, advertising and to improve our site. By continuing to use our site, you accept to our Privacy policy and allow us to store cookies.