On behalf of the Microsoft CRM Product Performance team I would like to take this opportunity to announce the release of Microsoft DynamicsTM CRM 4.0 Performance Toolkit.
The toolkit is available for download at www.codeplex.com/crmperftoolkit.
The instructions for getting started are described in “Microsoft Dynamics CRM 4 Performance Toolkit.docx” located at www.codeplex.com/crmperftoolkit
The Microsoft DynamicsTM CRM 4.0 Performance Toolkit was created by the Microsoft CRM product team to formalize testing of Microsoft CRM 4.0. The performance toolkit can be used by the Microsoft CRM partners and customers to collect data to support their CRM deployment decisions.
The toolkit facilitates load testing the performance of CRM deployments. By carefully planning the required dataset that the deployment needs to support and the workload requirements, the toolkit can be used to test if the scale requirements of a particular deployment can be met. This mechanism can be used in the decisions on a particular deployment solution and avoid costly downtimes at a later stage.
The Performance toolkit contains various tools listed below that can be used in customizing the CRM installation, populating the necessary semantic data for the required scale and conducting the benchmarking tests against the CRM installation. The tools provided in the Performance toolkit are:
1. ImportCustomization Tool
2. DbPopulator Tool
3. CRM_Perf_Benchmark Tool
The Performance Toolkit is distributed in source format under the Open source licensing as provided by codeplex license agreement. Knowledge of Microsoft Visual Studio® and Microsoft Visual C#® is required to use the toolkit. The following are the pre-requisites to conduct the performance tests.
- Microsoft Visual Studio 2005 Team System running on a client system used to drive the CRM product. A workstation with 1GB RAM is sufficient to run the benchmarking tests.
- Microsoft CRM 4.0 deployment suitable for performance testing. Ideally, the hardware configuration should be similar to the actual production environment.
CRM 4.0 Performance Toolkit Components
The toolkit consists of following tools:
This is an xml driven tool that uses Microsoft Dynamics CRM 4.0 API calls to load the CRM deployment system with pre-requisite data.
This is a tool that uses the Microsoft Dynamics CRM 4.0 API calls to import and publish customizations that can be provided using a customization xml file.
This is a tool that can be run in the Visual Studio Test infrastructure that comprises of several scenario driven tests that can be used to test the performance of the Microsoft Dynamics CRM deployment under a load simulation.
Setting Up the Test Environment
A brief overview of the setup process is given here and for further details you can refer to the Microsoft Dynamics CRM 4 Performance Toolkit.docx mentioned above.
Install Microsoft Visual Studio 2005 Team System
Install Microsoft Visual Studio 2005 Team System according to the Visual Studio installation instructions on a dedicated client computer.
Install Microsoft CRM 4.0 Test System
Install a Microsoft CRM 4.0 test system according to the Microsoft CRM 4.0 implementation Guide. This guide is available on the Microsoft download site at http://www.microsoft.com/downloads/details.aspx?FamilyID=1ceb5e01-de9f-48c0-8ce2-51633ebf4714&displaylang=en
Create test users in the Test Domain
You must create a pool of test users on the domain for use in the performance testing of the Microsoft CRM deployment. Each of these users will be named with a prefix and an index, for instance, in our guide we will have test users named crmusr1 to crmusrN where N is the number of test users that the CRM deployment needs to support. In the test environment it is assumed all the test users have the same password.
The following command script can be run to populate domain users crmusr1 to crmusr200 with the password “pass”. This should be run by logging into the domain as a domain administrator on any of the machines in the domain:
C:\> for /L %i in (1,1,200) do net user crmusr%i pass /add /domain
Microsoft CRM 4.0 Performance Toolkit installation
By completing the pre-requisite steps, the System Under Test should be ready to download and setup the Performance Toolkit. In this version of the toolkit several enhancements have been done. One of them being, the toolkit now comes in an MSI package that can be run to install and configure the toolkit to your system without going through any special post setup configurations. The toolkit is available for download at www.codeplex.com/crmperftoolkit.
When the MSI package is run, the following menu items are shown to configure the toolkit to the system.
The default is to setup the Toolkit in C:\CRM 4.0 Toolkit Folder. This can be changed by selecting the browse button and selecting the desired folder. After selecting the desired folder to install the toolkit in, click on “Next”
The next step in the setup process is to select the ConfigFiles folder. This folder is where the configuration files that used by the toolkit will be placed in. The default is “ConfigFiles” folder. This folder can be customized by selecting the browse button. Once the desired Configuration files folder is selected, click on “Next”. This will lead to the following setup step.
In this step, the various servers in the System under test can be selected. The Run as username is the domain user name of the user who deploys the Microsoft CRM system. This user must have the Administrator privileges in the CRM system as well as the domain.
In this screen, the organization and test users that are created in the pre-requisite step are specified. There are two types of test user, the first set is the test users under whose context the web tests are run and the outlook users under whose context the outlook unit tests are run. Usually these two sets of users can be the same. A sample of the filled form is shown below:
After configuring the servers and the organization name and the users, when the “Next” button is clicked, the setup process begins. The following are the following tasks that are completed by the setup process.
- The source files and executable files are dropped in the folders as follows under the root folder chosen during setup. If the default “CRM 4.0 Toolkit” folder is chosen during setup and the default “ConfigFiles” is chosen for the configuration files under the root folder, then the following are the folders created.
- The data population tool and the import customization tool binaries are dropped into the “Binaries” folder. A batch file called “RunPopulation.cmd” is also dropped in the binaries folder. This RunPopulation.cmd when run will
- Customize the Microsoft Dynamics CRM 4.0 deployment with a few sample customizations
- Add the users specified in the setup process to the CRM organization
- Create a comprehensive dataset for each of the users specified in the setup.
After the setup for the CRM Performance Toolkit is completed, the next step before running the performance tests is to create the necessary data. A set of sample xml files that drive the dbpopulator tool are configured for the CRM system and placed in the Binaries\DbPopulator folder. A set of sample customization xml files are also placed in Binaries\ImportCustomization folder.
Compile the CRM_Perf_Benchmark tool
Once the data has been populated, open the CRM4_Perf_Benchmark solution and compile the solution. Once the solution is compiled, the list of tests each of which is a crm user action scenario can be viewed by opening the Test Manager.
Populate the EntityManager Database
To keep the tests realistic, it is not advisable for the test infrastructure to touch the CRM databases directly during the test runs. For this reason, all the pre-requisite data used by the performance tests is copied to a local database on the Client from the CRM database servers. This database is called EntityManager database. The EntityManager database is created by the CRM Performance Toolkit setup process. The copying of the data from the CRM databases to the EntityManager database can be done running the EMDBLoader.exe which is a part of the CRM4_Perf_Toolkit solution.
Run a WebTest
With this the user should be ready to run the performance tests. Most configuration and setup problems can be diagnosed by running an individual Web test. To run an individual Web test, do the following:
- 1. On the Visual Studio toolbar, select Test, point to Windows, and then select Test Manager.
- 2. Start dbmon.exe in a dedicated Visual Studio Command Prompt window.
- 3. In Visual Studio, scroll down and locate the row with CreateNewNoteForAccount in the Test Name column. Select the check box for this row, right-click, and then select Run Checked Tests.
- 4. Monitor the output from dbmon.exe. You should see messages being generated as the data from the EMDB is loaded into memory for use by the Web test. Depending on the size of your test dataset this can take from several seconds to several minutes.
- 5. Monitor the Test Results window in Visual Studio. You should see a passed result if everything has run correctly. Double-clicking the Test Name in the Test Results window will show the details of the test, and is a starting point for debugging any errors that may have occurred.
If errors occurred you may have to debug in order to determine the source of the problem. You can do this by selecting Debug Checked Tests.
The toolkit is created as a project www.codeplex.com/crmperftoolkit in order to develop a community which can actively utilize the toolkit as well as contribute in enhancing the tool with further improvements down the road. If you are interested in contributing to the project, send a request to email@example.com with a request to become a contributor to the crmperftoolkit project. For help and to report issues please see the sections “Discussions” and “Issue Tracker” in the project web page www.codeplex.com/crmperftoolkit.