Microsoft Test Manager & Coded UI Test issues fixed in Visual Studio 2010 SP1 beta

With the release of Visual Studio 2010 Service Pack 1 Beta we have fixed some important & high impact bugs that were affecting our customers at large volume. Following is the list of issues that are fixed and we have fixed many more important issues in the overall product. Please move to SP1 Beta to experience faster & better VS 2010.

Issue : While generating code from CodedUITestBuilder you may get “Any Item with the same key has already been added” Or ”Object with ID not found”

Description:   In any of the following scenario

1. Generate code using Coded UI Test builder after doing some recording

2. Generate code from the action recording done using Microsoft Test Manager

You may hit the following error message:

                “Any Item with the same key has already been added” Or ”Object with ID not found”

                This was due to code merge issue where merging generated code was always case sensitive wrt UITest objects ID property. This bug has been fixed now.

Issue: Coded UI Test does not show up alternate credentials dialog if user tries to generate code from action recordings.

Description: If a user does not have permission to access work items from TFS and is trying to generate code from existing action recordings, Coded UI Test should show up alternate credentials dialog to enter the user credentials. So he’ll not be able to generate code. Ideally Coded UI Test should have should display the alternative credentials dialog or use the credentials used in team explorer to connect to TFS.

Issue : Doing a FindMatchingControls() on browser window object causes UITestException.

Description: If user tries to use FindMatchingControls() method on browser window object, Coded UI Test will throw a UI Test exception with error message “Exception was thrown from the UITest module” instead of returning the collection of all IE windows satisfying the search criteria. Following is the extract from the stack trace for the exception:

Microsoft.VisualStudio.TestTools.UITesting.UITestControl.get_TechnologyElement()

Microsoft.VisualStudio.TestTools.UITesting.UITestControl.get_UIObject()

Microsoft.VisualStudio.TestTools.UITesting.UITestControl.get_QueryId()

Microsoft.VisualStudio.TestTools.UITesting.UITestControl.FindMatchingControls().....

Issue : Launching Coded UI Test builder does nothing or throws “The method or operation is not implemented” when Coded UI Test project is present along with a setup/deployment project in same Visual Studio solution.

Description: Try to create a solution in Visual Studio 2010 with setup/deploy projects. Add a Coded UI Test project to it, user will not be able to generate code, whenever you try to launch Coded UI Test builder to generate code either it’ll do nothing or it’ll throw up an error message mentioning “The method or operation is not implemented”.

Issue: MTM crashes with System.NullReferenceException if user tries to change the playbackbrowser.

Description: This issue will happen if user tries to change the browser for playback to ‘Firefox’ which is supported with the release of VS 2010 Feature Pack 2.

1. User creates a test case in Microsoft Test Manager 2010.

2. Add a test case to the test plan.

3. Do the recording and playback the recorded strip.

4. Change the browser to FireFox in change browser dialog under ‘Playback’ menu item. 

5. Do actions on desktop, start menu.

MTM crashes with the following stack trace:

at Microsoft.VisualStudio.TestTools.UITest.Recorder.LowLevelHookEventCapture.LowLevelHookMethod(Int32, IntPtr, IntPtr)
   at Microsoft.VisualStudio.TestTools.UITest.Extension.NativeMethods.PeekMessage(MSG ByRef, IntPtr, Int32, Int32, Int32)
   at Microsoft.VisualStudio.TestTools.UITest.Recorder.LowLevelHookEventCapture.WindowMessagePump()
   at……

In addition to the above fixes, SP1 includes the hot fix (KB2403277) that had fixes for the issues described in this link.

 

Deepak Singhal

Visual Studio ALM.