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
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.
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. 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.
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.
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.
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
<add key="AnnotationTool" value="%ProgramFiles%\Paint.Net\PaintDotNet.exe"/>
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,
<add key="TestManagement.EnableSoapTracing" value="true" />
Now set the trace level to between 1 – 4, for diagnostic level tracing set the level to 4,
<!-- 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" />
You can use ‘Fiddler’ or download ‘DebugView’ a free trace listener to listen in!
Apart from that you can also enable Test Execution Event Log Tracing by adding the following key to the config
<!-- 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"/>
<!-- Log folder. Trace logs for background recorder and playback are placed in this folder. -->
<add key="UITestTraceFolder" value="%TEMP%\UITestLogs"/>
<!-- 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 trouble shoot when you run in to an issue with TFS, Build or MTM?
Thank you for taking the time out and reading this blog post. If you enjoyed the post, remember to subscribe to http://feeds.feedburner.com/TarunArora.