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
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
After finishing the installation lunch the test controler configuration tool
Here you have to specify which account to be used with test controller service and load testing database server that will store performance data.
Now Installing Agent on Agent machines, in our environment we will install it into three machines joined to same controller machine domain.
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.
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
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
From Load test manage test controllers to make sure all agents are connected and in ready state
list of agents getting displayed with status for each agent
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
Choose remote execution for test execution method
In test settings wizard you could specify the host where test will run
You could change the test time out as well
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
First you have to include the executable that calls the web service , in our case we developed a WPF application that calls the service
After calling the service from the executable the SOAP call is recorded as shown below
After the wizard is complete two CS files is added to your project
in next post we will proceed with configuring the WCF unit test and the remaining steps to perform the load test