Click here to Skip to main content
Click here to Skip to main content

Load testing for .NET Developers and testers

, 8 Sep 2004
If you are involved in developing .NET web applications, either websites or web services, you need to be sure that the application is going to scale once it is put under the stress of a multiple-user load.

Editorial Note

This article is in the Product Showcase section for our sponsors at CodeProject. These reviews are intended to provide you with information on products and services that we consider useful and of value to developers.

This is a showcase review for our sponsors at CodeProject. These reviews are intended to provide you with information on products and services that we consider useful and of value to developers.

ANTS Load by Red Gate Software

(Click here for your free trial)

If you are involved in developing .NET web applications, either websites or web services, you need to be sure that the application is going to scale once it is put under the stress of a multiple-user load. 

ANTS Load is used to predict a web application's behavior and performance under the stress of a multiple-user load. It does this by simulating multiple clients accessing a web application at the same time, and measuring what happens.

ANTS Load works particularly well for applications written using Microsoft technologies such as ASP and ASP.NET.

Testing an application with ANTS Load

In this example we’re going to load test an intranet site using the ANTS Load wizard, but often users choose to use the standard windows controls once they are familiar with the product. 

To launch the wizard, click the "Project wizard" button at the top left of the ANTS Load screen, or click the "Create a project using the wizard" link.

Screenshot 1. Choosing to test a website or web service

This is the first screen of the ANTS Load wizard. To load test a website you need to select "I want to test a website." The alternative is to test a web service.

Screenshot 2. Record a script

The next choice on the wizard is to record a script. To do this, click on the "Record script" button. Internet Explorer will automatically open and display the message:

"Recording a script"

"Navigate to the website that you want to test, or type the URL into the browser bar. As you browse the site, ANTS Load will record a script in Visual Basic.NET to mimic your browsing actions."

Once Internet Explorer has opened, go to the site you wish to test and carry out the actions you expect users to conduct. All of this will be recorded in a script.

 

Screenshot 3. Building the script by using the application

In this example, we are going to go to a local intranet site, view someone's details and send them a message. Once you've finished all the things you think your user will do, close Internet Explorer and ANTS Load will automatically generate a script.

Screenshot 4. Details of a script

If we are interested, we can then look at the script we have created. There is no need to do that at this stage since the script is ready to be run, but many users like to look at the details. More experienced users may wish to enter state information that would make the test more realistic.  Clicking on any of the links in the script shows the pages and images ANTS is going to collect.

Once you are happy your script is doing what you want it to, you can proceed to the next stage.

Screenshot 5. Specify the computer hosting the web application

We now need to choose which computer is hosting the web application so that we can take measurements from the performance counters. These counters will give us information about what is happening to the hardware and software of the web server we are load testing. We need to have permission to access this computer with administration or power-user rights. The default value is that of the PC you are running ANTS Load on. Once you've done this you are ready to run a test.

Screenshot 6. Run test with default settings

You can choose to save the project, or run the project immediately by ticking the appropriate check-box. We're, however, going to go through some of the steps in configuring the load, before we run the test. We, therefore, click "Finish," without checking a box, and then click the "Edit Load" button on the main screen.

  

Screenshot 7. Editing a load composition prior to running a test

The first screen you are presented with is the load composition – this is the virtual client we have just created. If you wanted to simulate different sorts of users during the test, you would configure that here. The "Ratio" button allows you to adjust the proportion in which the different clients are run, and "State" information allows you to input a range of varied information into the test, for example the user names and passwords of different users.

Screenshot 8. Editing the type of load test

Clicking on the "Test type" tab allows you to set the number of virtual clients you would like to simulate, and the length of time you would like to run the test. In this case we are going to simulate 100 virtual users accessing our application simultaneously, and we are going to run the test for 10 minutes.

Screenshot 9. Looking at the performance counters to be tested

You can also look at performance counters by clicking on the "Counters" tab. As a default you look at six of these, but there are thousands you can choose from for use in various situations.

Once the load is configured, you are ready to run the test. To start the test, press the green "Run project" button in the main window of ANTS Load.

Screenshot 10. Running a load test

While the test is running, ANTS Load gives you a snapshot of the situation at that time. This can be very useful in long tests if things go wrong and you need to stop a test before it was planned to finish. Once the test has finished, close the "Run test" window to display results automatically.

Screenshot 11. Results of a load test

From this screen you can drill down and see further details about the results of your test. Business impact statistics – the abandonment prediction and frustration coefficient – are headlined, while the other details will be shown below, once you click the link to the information you would like to display.

Screenshot 12. Drill down to see detailed results of a load test

Drilling down will display detailed results about a user's experience as well as the performance of the server. The results contain a very large amount of information, particularly in more complex tests. The results will allow you to quantify exactly what is happening with your application and where it is happening so that you can determine what changes you need to make to improve the performance of your application.

A vital development tool

ANTS Load is a load testing tool that gives you the information you need simply and rapidly, so that you are able to understand how your application performs when put under stress.

There are a number of positive reviews of ANTS Load, which has been described as "pretty darned spiffy...incredibly easy to set up...All in all, a well-executed testing application that fits right into the .NET universe."

Evaluate ANTS Load with your applications to see how well it will work for you – download a free, fully functional trial.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

Red Gate Software
Red Gate Software Ltd.
United Kingdom United Kingdom
Red Gate Software makes ingeniously simple tools used by over 650,000 Microsoft technology professionals working with .NET (incl. ASP.NET), SQL Server, Azure, and Oracle. More than 100,000 companies use our products, including 93% of the Fortune 100.

Our philosophy is to design highly usable, reliable tools which elegantly solve the problems that developers and database administrators face every day.
Group type: Organisation

4 members

Follow on   Twitter   Google+

Comments and Discussions

 
GeneralAnts Load is no longer available PinmemberSameer Alibhai24-Oct-08 6:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.141216.1 | Last Updated 8 Sep 2004
Article Copyright 2004 by Red Gate Software
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid