top of page

Selenium - MS CRM Ctrl + Shift + Q

One of the main attribute to term a product development successful is the satisfaction level of User experience. User experience can include attributes like ease of use, pleasantness to eyes, accessibility, self-explanatory and Performance. Performance of an application or product in end users view is normally the time between two operations. Users at most interest will be using the application seamlessly without any delay between operations. Sometimes, performance testing might miss this important point because of various reasons like not understanding the complete objective or tools used in performance does not serve this purpose. Most of the tools in market focus on measuring how fast the interactions between client and server happens. In other words, tools measure time between the message sent from client machine to server and vice versa. Most tool do not measure the rendering time on the Web browsers. This is very important from heavy client side application like MS CRM 2013 and above.      

    

Sometimes team trust a performance tool so much that they present the results to the customer without considering these facts. As each project has different objective and testing should be context dependent, it is testing team’s responsibility to look into more ways to achieve the performance objective. This will ossify the customer’s trust on testers and the service organization. Combined and wise use of the tools and available use of in-built feature of tool which yields better results.


MS CRM 2013 or above are heavy client side applications. Measurement of response time of any transactions in these kind of application should not only be the sum of time taken for request to reach server and response to reach client but also include the client rendering time. Unfortunately, most commercial tool measure only the first part. In order to get the total response time, wise use of combination of tools can serve as alternative way to achieve expected outcome.
This article describe the use of MS CRM inbuilt performance tool and Selenium to get an automated solution for measuring total response time of any transaction on MS CRM application.

 

About MS CRM Performance Center (CTRL+ Shift + Q) tool

MS CRM Performance Center (CTRL+ Shift + Q) tool is Microsoft’s inbuilt performance analyzer for MS CRM Dynamics. 

When MS CRM has many customizations, plug-ins, business rules, sub-grid on a form, this tool provides breakdown of time taken to load each item in the form (in milliseconds)

Pressing CTRL+Shift+Q on MS CRM form will launch Performance Center tool. To activate the tool, “Enable” button has to be clicked. It is a good practice to disable the Performance Center tool when not in use.

In addition to the graphical view, when the “Select Major” button is clicked, the breakdown in a text format can be seen.“Copy All” button will copy the content to clip board.

Alternate way to launch MS CRM Performance Center without press of CTRL+ Shift + Q

 

This CTRL+Shift+Quses below JavaScript to toggle its state (Open / Close)

Mscrm.Performance.PerformanceCenter.get_instance().TogglePerformanceResultsVisibility();

 

This can be verified by executing above JavaScript in Script console of the browser F12 development tools.

Launch MS CRM Performance Center using Selenium-Webdriver

Using Selenium-WebdriverJavascriptExecutormethod, MS CRM Performance analyzer can be toggled.

Automate response time measuring using MS CRM Performance Center using Selenium-Webdriver

Now, we have all the pre-requisites ready to automate the process of client side response time measurement of CRM form using performance center tool (Ctrl+Shift+Q) and Selenium Webdriver.

Following are the steps to automate:

  1. Open MS CRM Application

  2. Launch Performance Center tool (Ctrl + Shift + Q)

  3. Click “Enable” on Performance Center tool and then Close the tool

  4. Perform the operation for which measurements are required. (Eg: Open Lead Form)

  5. Launch Performance Center tool (Ctrl + Shift + Q) again

  6. Click on “Get Major” button

  7. Click on “Copy All” button

  8. Take Screenshot of Performance Center tool

  9. Generate Excel report

    1. Paste the copied break down

    2. Get the total time for loading time from the break down using custom method. Convert millisecs values to seconds

    3. Paste the Screenshot in the report

 

Steps in detail:

1. Open MS CRM application using Selenium Webdriver (Java Client

2. Launch Performance Center tool using Selenium-WebdriverJavaScriptExecutormethod

3. Selenium-Webdriver script will click on “Enable” button

4. Close the Performance Center tool using Selenium-WebdriverJavaScriptExecutor

5. Selenium Webdriverscript will navigate to open any form in MS CRM application

a. Click on SALES tile

b. Click on LEAD tile

c. Open any record present in the Open Lead view

6. Performance Center tool using Selenium-WebdriverJavaScriptExecutor method

7. Selenium-Webdriver script will click on “Select major” button. Break down will appear

8. Custom method getScreenshot() will take Screenshot and paste to report

9. Selenium-Webdriver script will click on “Copy All” button

10. Custom method generatorReport() will paste the details in the report, calculate time in seconds and format the report

a. Summary Sheet (High level detail)

Note: When there are more than one scenario (Open_Lead), response time of those scenario will add to the list

b. Details with breakdown and Screenshot

Note: When there are more than one scenario (Open_Lead), new sheet will be created for those scenarios

 

Conclusion

Advantages of the above solution are:

  • Solution can be used to find any regression performance issues due to any new change to any CRM form.

  • Whenever a user of  MS CRM application is facing issue with form loading, this kind of packaged solution can be shared with the users. User can run the solution in their machine and share the report with development team for further analysis.

bottom of page