GD Bloggers

This is the blog site for Microsoft Global Delivery Communities focused in sharing the technical knowledge about devices, apps and cloud.
Follow Us On Twitter! Subscribe To Our Blog! Contact Us

Load testing for WCF service (wsHttpBinding Binding) walkthrough

Load testing for WCF service (wsHttpBinding Binding) walkthrough

  • Comments 3
  • Likes

In this walkthrough I will perform load testing for WCF service using VS 2012 ultimate version using test environment that consists of one controller and three agent machines, what we will cover in this walkthrough could be summarized into the following:

  • Configure test environment (one controller and three agents)
  • Install VS 2012 controller into controller machine
  • Install VS 2012 Agents into agent’s machines
  • Configure test settings for test project using VS
  • Install add-one for WCF Load Test for VS 2012 from ALM rangers
  • Create and configure Unit test project using VS IDE
  • Create load test project and run the test
  • Analyze the result

First we will start by downloading the VS test agent and controller update 4 installers located at

http://www.microsoft.com/en-us/download/confirmation.aspx?id=38186

image

image

The installer consists of two folders and two installer files vstf_testagent.exe and vstf_testcontroller.exe

First we will begin by Installing and configuring the controller, make sure VS 2012 is installed and running on controller machine, also SQL is needed to store performance data

image

image

After finishing the installation lunch the test controler configuration tool

image

Here you have to specify which account to be used with test controller service and load testing database server that will store performance data.

image

Now Installing Agent on Agent machines, in our environment we will install it into three machines joined to same controller machine domain.

image

Next configure the Agents to connect to controller, in WCF scenario we need to run in as a service as no interaction is needed in load test.

image

Then configure the test agent by specifying the account name and the test controller we have created previously , make sure the port 6901 is set in test controller name

image

image

Now after configuring the test Agents and controller we could create load test project using VS 2012 IDE, Create Web performance and Load test project from Test category in new project menu in VS 2012 IDE

image

From Load test manage test controllers to make sure all agents are connected and in ready state

image

list of agents getting displayed with status for each agent

image

To distribute the tests on agents we have to create test settings for load test project to enable remote execution on agents (running tests on Agents instead of controller only (local execution)),this could be accomplished by adding new item to project and choose test setting

image

Choose remote execution for test execution method

image

In test settings wizard you could specify the host where test will run

image

You could change the test time out as well

image

Now we will install the Load Tests add-on for VS for WCF, you could download it from URL:

http://wcfloadtest.codeplex.com/

After downloading and installing the add-on you could add new item with WCF test template that will start new WCF test generation wizard that will guide you to log the WCF call and save it as unit test

image

First you have to include the executable that calls the web service , in our case we developed a WPF application that calls the service

image

After calling the service from the executable the SOAP call is recorded as shown below

image

After the wizard is complete two CS files is added to your project

image

in next post we will proceed with configuring the WCF unit test and the remaining steps to perform the load test

Comments
  • Ok, so where is the next post?

  • Would like to go through next post, please share the next post link.

  • Thanks, and where is the next post ?

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment