We're Hiring!
Take the next step in your career and work on diverse technology projects with cross-functional teams.
LEARN MORE
Mountain West Farm Bureau Insurance
office workers empowered by business technology solutions
BLOG
8
31
2016

Load Testing WCF Services using Visual Studio – Part 2

Last updated:
7.15.2021

Introduction

This is a two-part series that covers using Visual Studio to load test a WCF service. In Part 1 of this series we covered how to create a project and unit tests. Part 2 covers creating and executing the load test.

Creating the Load Tests

MM_201604_LTW1.png
Figure 4 - Load Test Wizard - Configuring the load pattern

Now that I have unit tests created (from Part 1), I will create and configure a load test. I added a load test to the solution and configured it using the wizard. There are several screens the wizard walks you through; in the interest of keeping this short, I’m only including a couple screen shots.

The next figure illustrates how references to the unit tests are added to the Load. There is a great deal of flexibility for specifying how unit tests are distributed. This allows me to closely match the expected operating conditions whereby a given service may have a different load than another.

MM_201604_LTW2.png
Figure 5 - Load Test Wizard - Configuring the test mix

Figure 5 shows how Solution Explorer looks once all the project items have been added.

MM_201604_SolutionExplorer.png
Figure 6 - Solution Explorer containing unit tests and load tests

Running the Load Tests

With all the prerequisite work out of the way, I am now ready to begin executing the load tests. Once I open the load test in Solution Explorer I can change any settings to suit my needs or just click Run Load Test from the menu.

MM_201604_LTTree.png
Figure 7 - Running the load test

As the load test runs, the results are displayed near real-time. Several graphs are drawn giving you valuable insight into what is happening.

Analyzing Results

Figure 7 shows the results of an actual WCF load test execution. This test was short, only 3 minutes where the user load was stepped up every few seconds. A good deal of valuable information was learned from this:

Figure 8 - Load test results graph

Graphs like the one above will help in determining what types of performance tuning might be necessary. The information derived from the load test can help answer if the service architecture is acceptable or if the hardware would need to be a higher caliber and/or scaled out. Regular execution of the load test over the duration of the development cycle provides clues into any inefficient code that might be added.

Summary

This article showed how to create unit tests that can be used to run load tests in Visual Studio. With minimal writing of code paired with the load testing capabilities available in Visual Studio, you can provide valuable insight into the design and performance of the WCF solution. This information will aid in determining if the solution performance will be within acceptable limits.

Part 1 – Load Testing a WCF service using Visual Studio

Recent Blog Posts

lunavi logo alternate white and yellow
11.19.2024
11
.
8
.
2024
Load & Performance Testing with Azure Load Testing Service

Learn about load and performance testing in Microsoft Azure.

Learn more
lunavi logo alternate white and yellow
10.8.2024
09
.
25
.
2024
Maximizing Business Efficiency with Azure DevOps

For enterprises looking to adopt or mature their DevOps practices, Azure DevOps offers unmatched flexibility, scalability, and depth.

Learn more
lunavi logo alternate white and yellow
10.8.2024
09
.
09
.
2024
Exploring Microsoft Fabric: A Comprehensive Overview

Discover how Microsoft Fabric transforms data management and analytics with powerful tools for real-time insights and seamless collaboration, driving smarter, faster business decisions.

Learn more