Click here to Skip to main content
15,867,686 members
Articles / All Topics

MTM 11-Configuration, Settings, Customization & Troubleshooting

Rate me:
Please Sign up or sign in to vote.
5.00/5 (1 vote)
14 Dec 2011CPOL3 min read 12K   1   1
MTM 11-Configuration, Settings, Customization & Troubleshooting

Welcome to the hidden treasure of “MTM.config.exe”.

Navigate to “C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE” and open the image

1. Can I change the number of Action Recording steps selected when a Bug is created?

When you are exploratory testing using Microsoft Test Manager or performing a feedback session using Feedback Manager and decide to raise a bug or create a test case, the last 4*10 Action recordings are selected by default. You can change the number of action recordings selected by default by changing the value of the key DefaultNumberOfActions, the multiplier of 4 of this value is the number of steps selected by default.

image

2. How Does MTM Know Win + E = Explorer, Can I Change this?

While recording a coded UI Test if you press Win + E, the Windows explorer window gets opened, similarly when you press Win + R, the run prompt gets opened and this gets recorded as part of your test. This can be good or bad depending on whether you would like this global key combination to be part of your Coded UI test. The good news is that Microsoft Test Manager is highly configurable,

In the app settings section, you will see the “GlobalHotKeys” section, this contains a list of all the hot key combinations MTM will honour during the coded UI test recording session, removing Windows, E; or Windows, R; from here will remove the resolution of this combination to Windows Explorer and Run Prompt respectively.

image

You also have the option of changing the key combination for HoverKey or simply turn off the recording for hovering action by setting the value of RecordImplicitHover to false. You also have the option of changing the Think time threshold value.

image

3. Where are the Short cut Key combinations stored and…. Can I change them?

The short cut key combinations for Passing Test Step, Failing Test Step, Moving to Next or Previous Test Step and Capturing Image are stored in the MTM.exe.config file.

image

Can I use a different tool than MSPaint to annotate the screen captures I take?

The answer is yes, change set the key AnnotateImage to true, my personal preference is Paint.Net, this setting can be changed in the MTM.exe.config by changing the value of the key AnnotationTool.

XML
<add key="AnnotationTool" value="%ProgramFiles%\Paint.Net\PaintDotNet.exe"/>

image

Test Run and Lab Settings

The MTM.config.exe also contains configuration settings for Lab and Test Run pertaining to environment refresh and data collection timespans that can also be changed from here.

4. Oh No, Something is wrong with MTM, how do I troubleshoot?

When I was working on trying to get the exploratory session information using the TFS API, I was trying to figure out what queries MTM fires in the background when I load the ‘View Exploratory Test Sessions’ page, I turned on fiddler in the background but to my despair I could not trap any communication. By default, Soap Tracing is disabled in Microsoft Test Manager, which is fair considering it has a performance overhead.

To enable soap tracing in MTM, you will need to edit the MTM.exe.config and set the value of TestManagement.EnableSoapTracing to true.

XML
<add key="TestManagement.EnableSoapTracing" value="true" />

Now set the trace level to between 1 – 4, for diagnostic level tracing, set the level to 4:

XML
<system.diagnostics>
    <switches>
      <!-- Trace settings for MTR -->
      <!-- Change the value to change the level of tracing you want.
            You must use integral values for "value".  
            0 ==> off,
            1 ==> error,
            2 ==> warn, 
            3 ==> info,
            4 ==> verbose.
            Note that each value is inclusive of the last.
        -->
      <add name="UITestTraceLevel" value="0" />
      <add name="EqtTraceLevel" value="0" />
      <add name="TestManagement" value="4" /> 
      <add name="TeamBuild" value="0" /> 
      <add name="TeamFoundationSoapProxy" value="0" /> 
    </switches>
    <trace autoflush="true"></trace>
  </system.diagnostics>

You can use ‘Fiddler’ or download ‘DebugView’ a free trace listener to listen in!

image

Apart from that, you can also enable Test Execution Event Log Tracing by adding the following key to the config:

XML
    <!-- EnableTestExecutionEventLogTracing: Errors that occur during execution 
of tests will be written to the event log. The default is "yes"; override with "no". -->
     <add key="EnableTestExecutionEventLogTracing" value="yes"/> 
XML
    <!-- Log folder. Trace logs for background recorder and playback are placed 
in this folder. -->
    <add key="UITestTraceFolder" value="%TEMP%\UITestLogs"/>
XML
    <!-- RemotingTimeoutSeconds: Maximum time a remoting call can last in seconds 
(default 10 minutes). -->
     <add key="RemotingTimeoutSeconds" value="600"/> 

Watch this video for more details on troubleshooting using Tracing…

Troubleshooting using Tracing

What techniques do you use to troubleshoot when you run into an issue with TFS, Build or MTM?

Thank you for taking the time to read this blog post. If you enjoyed the post, remember to subscribe to http://feeds.feedburner.com/TarunArora.

Image 8

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior) Avanade
United Kingdom United Kingdom
Solution Developer - C# .NET, ALM

Tarun Arora is a Microsoft Certified professional developer for Enterprise Applications. He has over 5 years of experience developing 'Energy Trading & Risk Management' solutions using Microsoft Technologies. Tarun has great passion for technology and travel (not necessarily in the same order)!

Comments and Discussions

 
GeneralMy vote of 5 Pin
NJKotze19-Dec-11 20:09
NJKotze19-Dec-11 20:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.