Friday, May 6, 2016

Microsoft Dynamics CRM Performance Toolkit 2015 Installation


Overview
The Microsoft DynamicsTM CRM 2015 Performance Toolkit was created by the Microsoft CRM product team to formalize performance testing of Microsoft CRM 2015.  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.
Preparation & Pre-installation requirements
Below are the different checks Hardware and Software to be made ​​to install the Microsoft CRM Performance Toolkit 2015.
Microsoft Dynamics CRM Performance Toolkit 2015 hardware, Software requirements
  • Windows 10
  • Windows 8.1
  • Windows 8
  • Windows 7 Service Pack 1
  • Windows Server 2012 R2
  • Windows Server 2012
  • Windows Server 2008 R2 SP1
Note: Installation on Windows 8.1 and Windows Server 2012 R2 requires Update 2919355 (also available from Windows Update).
  • 1.6 GHz or faster processor
  • 1 GB of RAM (1.5 GB if running on a virtual machine)
  • 4 GB of available hard disk space
  • 5400 RPM hard disk drive
  • DirectX 9-capable video card that runs at
    1024 x 768 or higher display resolution

  • This version of Visual Studio works best with Internet Explorer 10 or later. Some features might not work as expected when it, or a later version, is not installed.
  • For Windows Store and Windows Universal app development:
    • Windows 8.1 and Windows Phone 8.1 and development require Windows 8.1 Update or later.
    • Windows Phone 8.0 development requires Windows 8.1 Update (x64) or later.
    • For emulator support (Windows or Android), Windows 8.1 (x64) Professional edition or later or Windows 10 Pro or Enterprise (x64) editions are required. A processor that supports Client Hyper-V and Second Level Address Translation (SLAT) is also required.













Requirement
Example
Domain User
Require two domain user
Contaso\Admin User
Contaso\Base User
Admin User Privilege
Member of Active Directory Domain Users
Member of Local administrator groups
Member of the Administrators group on the computer where SQL Server installed
Should have sysadmin rights on MS SQL Server
CRM Organization Name

CRM Organization Service URL

CRM Application URL or IP
CRM SQL Server Database IP and Access
Org_MSCRM and MSCRM_CONFIG
SQL Server Port
SQL Database port should have opened from that machine where you install CRM Performance Toolkit.





Performance Toolkit Installation Steps

Step 1:
Download CRM Performance toolkit  Zip to your local system.by https://github.com/Microsoft/CRM-Performance-Toolkit
Unzip CRMToolkit.zp under C: drive or any other drivers

Open Powershell and set-exexutionpolicy unrestricted.It will enable rights in powershell
Move go to C:\CRMToolkit\Setup (assume the toolkit was extracted to C:) in power shell
Run the command in Power shell mentioned below. This command does the following.
·         Install CRM SDK
·         Generate WSDL proxy classes
·         Partially set up ConfigSettings.xml; please see Conig Settings below for the setup needed after toolkit setup
·         Build toolkit

 Run ToolkitSetup.ps1 - ToolkitSetup.ps1 -adminName:<CRM Administraor Name> -adminPassword:<CRM Administrator <password>> -domainName:<CRM Domain> -crmServerName:<CRM Server Name> -sqlServerName <SQL Server Name> -orgName:<test org name> -configSku:<Online or Onprem> -release <CRM2013SP1 or CRM2015 or CRM2015SP1> -crmSdkBinDir <CRM SDK bin folder path> -crmSDKReservedDllPath <the location for Microsoft.Crm.Sdk.Reserved.dll> -outlookDllsPath <the location for dlls required to run outlook test case>
 Sample commands:
                - .\ToolkitSetup.ps1 -adminName administrator -adminPassword <password> -domainName apollo6dom -crmServerName apollo6web -sqlServerName apollo6sql -orgName testOrg -configSku onprem -release CRM2015 -crmSdkBinDir "C:\CRM2015SDK\SDK\Bin" -crmSDKReservedDllPath "C:\Program Files\Microsoft Dynamics CRM\Client\res\web\bin" -outlookDllsPath "C:\Program Files\Microsoft Dynamics CRM\Client\res\web\bin" -ssl $false
Step 2:
Open the configuration settings file.
<CRMToolkit Install Dir>\CRMToolkit\ConfigFiles
Modify <AD> section. Mention  Base User details.
Step 3:
Create  EntityManager on the client machine by running command in powershell. Command is mentioned below.
run <CRMToolkit Install Dir>\Binaries\Scripts\SQL\EMDB_Setup.sql
This database will maintain the all entity details in client system
Note: Columns of each Entities should match with CRM Server .if not add those columns.

Step 4:
Create  Loadtest on the client machine by running command in powershell. Command is mentioned below.
run <CRMToolkit Install Dir>\Binaries\Scripts\SQL\loadtestresultsrepository.sql
This database will maintain the all load test results details in client system
Note: Take the backup of Entity Manger and Load Test databases.
Step 5:
Configured load test store on VS2015 Enterprise. Steps are mentioned below.
Load Test(from toolbar) -> Manage Test Controller -> Load test results store ->
 provide server  and database (LoadTest2010) -> Test Connection -> OK
Step 7:
Populated test data by running following command in Power Shell.
       -CD to <CRMToolkit Install Dir>\Binaries\Scripts\ps >> .\DataPopulation_320UserBaseline.ps1 -release CRM2016
This command import the test solutions from C:\CRMToolkit\CRMToolkit\Binaries\Solutions to CRM Server
Note:Make sure Base and admin user details are correct in sample xmls .
\Binaries\XMLFiles\DBPop\320UserBaselineData

Step 8:
Open <toolkit dir>\CRM_Perf_Toolkit\CRM_Perf_Toolkit.sln in Visual Studio
Right click on Solution ‘CRM_Perf_Toolkit’ -> Properties
Click on Configuration Manager


Select the proper configuration from Active solution configurations dropdown list

Click Close -> 0K
Right click on Solution ‘CRM_Perf_Toolkit’ -> Build solution

Step 9:
Run the EMDB Loader file in power shell. Command mentioned below.
<CRMToolkit Install Dir>\CRM_Perf_Toolkit\EMDBLoader\bin\Debug>> .\emdbloader.exe
This will check the connectivity of CRM Server and load the sample data in local database
Note: Make sure Base and admin user details are correct in sample xmls.
Take the backup of Entity Manger and Load Test databases after successful run of emdbloader
Step 10:
Open the Visual Studio.
 Right click on Load Test Folder>> Add Load Test>> filled required Load Test details>> Right clicked on Run Settings -> Run Load Test
Details below:
Right click on Load Test>> Add>> Load Test>>
a) Enter the Name



Think Time: Think times are fundamental to load testing and represent pauses between actions that occur when a user is interacting with the system. Think times can occur with almost any granularity depending on what is being tested. For example, if you were load testing a keyboard driver, you would be concerned with the think time that occurs between keystrokes.


b) Select the load Pattern




Load test can be done by two types of user load
1)       Constant User Load:
           Constant no of users will perform test  from start  to end
2)       Step User Load:
         No of users will increase with certain period of time
c) Select Test Mixed Model

















d) Select the Test Mix


Click add and select the test cases and click ok

Note: You can customize the load tests by CRMToolkit\CRM_Perf_Toolkit\CRM_Perf_BenchMark\UnitTests\ExchangeSyncTestDriver



e) Select the network mix




F)  Enter the counter Sets (Optional Step)


Counter Set Details:
When you create a load test with the New Load Test Wizard, you add an initial set of counters. These offer you a set of predefined counter sets for your load test.
System_CAPS_noteNote
If your load tests are distributed across remote machines, controller and agent counters are mapped to the controller and agent counter sets. For more information about how to use remote machines in your load test, see Distributing Load Test Runs Across Multiple Test Machines Using Test Controllers and Test Agents.
Requirements
·         Visual Studio Enterprise
Managing counter sets involves choosing the set of computers you want to collect performance data from, and assigning a set of counter sets to collect from each individual computer. You manage your counters in the Load











Test Editor.




Manage counter sets

1.       Open a load test.
2.       Choose the Manage Counter Sets button.
– or –
Right-click Counter Sets folder in the load test tree and choose Manage Counter Sets.
The Manage Counter Sets dialog box is displayed.
3.       (Optional) In the Selected computers and counter sets will be added under the following run settings list box, select a different run setting.
System_CAPS_noteNote
This only applies if you have more than one run setting in your load test.
4.       (Optional) Choose Add Computer to add a new computer to monitor. You will be prompted for a name. Type the name of a computer, and you will see nodes below the new entry. For example ASP.NET, IIS, SQL, and others. Select the check boxes in front of the nodes you want to select. The new counters appear in the Preview selections pane.
5.       (Optional) In the Computer Tags text box, type a tag to associate with the computer. For example, "TestMachine12 in lab3".
Computer tags let you identify a computer with an easy-to-recognize name.
The tags are displayed in the Counter Set Mappings node in the tree in the Load Test Editor. More important, the tags are displayed in Excel reports, which help stakeholders identify what role the computer has in the load test. For example, "Web Server1 in lab2" or "SQL Server2 in Phoenix office"
6.       Choose OK.


g)Enter the run settings and finish


























h)Right click on Run Settings and run the load test




i) Finally you can see the Load Test Results 





See the comments also.













8 comments:

  1. CRM Performance Toolkit 2015

    ReplyDelete
  2. Step 1 you can put ip crmsever(192.168.0.33:8010 with port) and sql server like 192.168.0.44

    ReplyDelete
  3. Fix for step 9;Fix for errors while running emdbloader.exe.Modify the GetUserFilter() in C:\CRMToolkit\CRMToolkit\CRM_Perf_Toolkit\CRM_Perf_BenchMark\EntityManager\EntityManager.CrmDBReaders.cs

    ReplyDelete
  4. private static FilterExpression GetUserFilter(MultipleServersData serverData)
    {
    FilterExpression where = new FilterExpression();
    where.FilterOperator = LogicalOperator.Or;

    // This is the main query
    string userNameBase = serverData.userBase;
    int userStart = int.Parse(serverData.userStart);
    int userCount = int.Parse(serverData.userCount);
    int userEnd = userStart + userCount - 1;

    // Create user list for user in range(like crmusr1 to crmusr320)
    List m_FilterUserSet = new List();
    QueryExpression query;
    ConditionExpression isDomainNameCondition = new ConditionExpression("domainname", ConditionOperator.Like, "%administrator%");

    EntityCollection results = null;
    try
    {
    query = new QueryExpression();
    query.EntityName = "systemuser";
    string[] Props = { "systemuserid", "domainname" };

    bool getmorerows = true;
    //Query Varibale is modified by mukilan
    //query = CommonTypes.EntityReader.BuildQueryExpression(CommonTypes.EntityType.Normal, query.EntityName.ToString(), Props, where, null);
    for (int i = 0; i < Props.Length; i++)
    {
    query.ColumnSet.AddColumn(Props[i].ToLower());

    }

    while (getmorerows)
    {
    results = adminUserProxy.RetrieveMultiple(query);
    query.PageInfo.PageNumber++;
    query.PageInfo.PagingCookie = results.PagingCookie;
    getmorerows = results.MoreRecords;

    for (int k = 0; k < results.Entities.Count; k++)
    {
    Entity en = results[k];
    string domainName = en.Attributes["domainname"].ToString();

    if (domainName.IndexOf(userNameBase, StringComparison.InvariantCultureIgnoreCase) >= 0)
    {
    var temp = domainName.Split('@');
    domainName = temp[0];
    // int count = Int32.Parse(domainName.Substring(domainName.IndexOf(userNameBase,
    // StringComparison.InvariantCultureIgnoreCase) + userNameBase.Length, domainName.Length -
    // (domainName.IndexOf(userNameBase, StringComparison.InvariantCultureIgnoreCase) + userNameBase.Length)));
    // if (count >= userStart && count <= userEnd)
    //{
    m_FilterUserSet.Add(en.Attributes["systemuserid"].ToString());
    // }
    }
    }
    }
    }
    catch (System.Exception e)
    {
    Trace.WriteLine("Exception:\n" + e.ToString());
    throw;
    }

    ConditionExpression userFilterCondition = new ConditionExpression("systemuserid", ConditionOperator.In, m_FilterUserSet.ToArray());
    where.AddCondition(userFilterCondition);
    where.AddCondition(isDomainNameCondition);
    return where;
    }

    ReplyDelete
  5. Wonderful post. This is nice post and gives in depth information. Great tips! CRM For Sales

    ReplyDelete
  6. Hello! Thank you so much for this overview, clear and detailed explanations of toolkit installation steps. It's great tutorial and it'll be very useful for me.

    ReplyDelete
  7. I really appreciate information shared above. It’s of great help. If someone want to learn Online (Virtual) instructor lead live training in Microsoft CRM, kindly contact us http://www.maxmunus.com/contact
    MaxMunus Offer World Class Virtual Instructor led training on Microsoft CRM. We have industry expert trainer. We provide Training Material and Software Support. MaxMunus has successfully conducted 100000+ trainings in India, USA, UK, Australlia, Switzerland, Qatar, Saudi Arabia, Bangladesh, Bahrain and UAE etc.
    For Demo Contact us.
    Nitesh Kumar
    MaxMunus
    E-mail: nitesh@maxmunus.com
    Skype id: nitesh_maxmunus
    Ph:(+91) 8553912023
    http://www.maxmunus.com/



    ReplyDelete
  8. Hello,
    I'm having a problem with the solution.
    I run the solution with Visual studio 2015 but the Microsoft.VisualStudio.QualityTools.LoadTestFramework dll are missing.
    Any suggestion?

    Thanks

    ReplyDelete