The Microsoft Dynamics CRM Blog
News and views from the Microsoft Dynamics CRM Team

Bandwidth testing using Microsoft Dynamics CRM Performance Toolkit

Bandwidth testing using Microsoft Dynamics CRM Performance Toolkit

  • Comments 1

CRM Performance toolkit (available for download in http://crmperftoolkit.codeplex.com/) provides an easy and comprehensive way to test various performance aspects of your CRM implementation. Here, I will brief on how you can use CRM Performance toolkit along with NetMon and VRTA to measure the bandwidth utilization during a test run of your performance scenarios.

Setup: To start with, install and configure CRM Performance toolkit (refer the blog of Aditya Varma here). Once you are able to run webtests and loadtests from CRM Performance toolkit, perform the following steps:

1. Download NetMon from http://www.microsoft.com/downloads/details.aspx?FamilyID=983b941d-06cb-4658-b7f6-3088333d062f&displaylang=en and install in the machine where you have installed CRM Performance toolkit.

2. Download VRTA (Visual Round Trip Analyzer) from http://www.microsoft.com/DOWNLOADS/details.aspx?familyid=119F3477-DCED-41E3-A0E7-D8B5CAE893A3&displaylang=en and install in the machine where you have installed CRM Performance toolkit.

3. Install the appropriate version of Windows Support tools in the machine where you have installed CRM Performance toolkit. The NetCap tool will be available as part of this installation.

4. Modify the node ‘bandwidthcapture’ in ConfigSettings.xml under <ToolkitInstallRoot>\ConfigFiles to reflect the install directory of NetCap (Windows Support Tools) and the output directory, like this:

<bandwidthcapture value="true">

    <netcapdir value="C:\Program Files\Support Tools"/>

    <bandwidthoutputdir value="C:\NetCap\7333\BenchMarkTestCases\ParsedFiles"/>

</bandwidthcapture>

5. Replace the BandWidthUtilities class in <ToolkitInstallRoot>\CRM4_Perf_Toolkit\CRM_Perf_Benchmark\Utilities\Util.cs with the below code.

class BandWidthUtilities
      {
          //all input parameters follow the NetCap command line help – see description by “netcap /?”
          public static bool StartCapture(
              string path,
              string sMbyte,
              string sCapFile,
              string sFilter,
              string sNIC,
              string sOffset,
              string sTrigStr
              )
          {
              try
              {
                  string strProgName = "NetCap";

                  //clear the existing same process(es) first
                  Process[] iProcesses = Process.GetProcessesByName(strProgName);
                  if (iProcesses.Length > 0)
                  {
                      foreach (Process iProcess in iProcesses)
                      {
                          iProcess.Kill();
                      }
                  }

                  //e.g. sOffset = '1e' or '1a', then sTrigStr = ‘01010101’
                  string strArgs = "/B:" + sMbyte + " /C:\"" + sCapFile + "\" /T P "
                      + sOffset + " " + sTrigStr + " /N:" + sNIC + " /F:" + sFilter;
                  if (StartProgram(strProgName, strArgs, path, true) >= 0)
                      return true;
                  else
                      return false;
              }
              catch (Exception e)
              {
                  WriteErrorLog(e.ToString());
                  return false;
              }
          }


See the rest of this code sample here: http://blogs.msdn.com/crm/pages/crm-performance-toolkit-example-code.aspx 
6. The function ‘RunNetMonExpert’ assumes that VRTA is installed in the default location (under local app data \Microsoft\VRTA). If VRTA is installed in some other directory, modify the function to point to the actual VRTA executable directory.

7. Rebuild the solution.

Test Bandwidth capture: Now we are all set to test bandwidth utilization, while running a web test or a load test. Make sure that ‘bandwidthcapture’ node in ConfigSettings.xml under <ToolkitInstallRoot>\ConfigFiles has <bandwidthcapture value="true"> and then run any web test or load test. You will see that inside ‘bandwidthoutputdir’ (set in ConfigSettings.xml in step 4); three files are created per transaction in the web tests. There is one .cap file which contains the raw capture data. You can use NetMon or VRTA to analyze this. Also, there will be one .txt file generated by VRTA which records the web requests with all the parameters. The third file is an .html file and the most convenient of all these. This file records all the key parameters for all the web requests and also keeps a link to the .cap and the .txt file in case you want to open them after seeing this consolidated report. You can add/remove parameters to be recorded in this file by modifying the ‘ParseRTAFile’ function in the above mentioned code.

If you want to capture the ‘warm’ state (static requests are cached) bandwidth result, then set <parsedependentrequests value="true"/> node in ConfigSettings.xml file whereas if you wish to capture the ‘cold’ state (every time static requests are sent to the server) bandwidth result, set this node value to “false”.

Sample Test Results: Here is how the ‘warm’ state result for AdvanceFindAccount looks like

AdvancedFindAccount (Warm)

Open Netcom capture File

Open Capture file as text

image

Conclusion: With the help of NetMon, NetCap, VRTA and minor modification in CRM Performance toolkit, we can easily perform bandwidth utilization testing for tests present in CRM Performance toolkit. Though the existing web tests provide a pretty good coverage, you can create additional tests according to the need of your bandwidth test suite.

Cheers,

Koushik Bhattacharjee



  • It would be great if an article could be written that covers Bandwidth testing using CRM 2011 online.

Page 1 of 1 (1 items)
Leave a Comment
  • Please add 1 and 2 and type the answer here:
  • Post