Coded UI: Editing/Changing Recorded Method Names

   Posted by: Tim Star

This is part 6 in a series of posts on creating and maintaining Coded UI tests with Multiple UI maps. My intent here is to give a little more detail to help those new to Visual Studio.

Part 1: Creating a new Coded UI solution

Part 2: Adding a New UI Map

Part 3: Modifying an Existing Coded UI Map

Part 4: Adding a UI Map to the TestRunUtility

Part 5: Assembling the test

Part 6: Changing Recorded Methods

Part 7: Deleting actions when recording with the Coded UI Test Builder

Part 8: Modifying Generated Code

Credits

This technique is an extension of the technique found in the following links by Anu , a Program Manager in the Visual Studio ALM Test Tools group and the MDSN documentation. http://blogs.msdn.com/b/anutthara/archive/2010/02/08/scaling-up-your-cuit-ui-automation-for-real-world-projects.aspx

http://blogs.msdn.com/b/anutthara/archive/2010/02/10/walkthrough-using-multiple-coded-ui-maps-in-test-automation.aspx

http://msdn.microsoft.com/en-us/library/ff398056.aspx

Editing/Changing Recorded Method Names

If you are unhappy with the name of your asserts or methods, you can double click the <page>Map.uitest file to open the UI Map editor -> highlight the method you want to change and press the F2 key or click the rename toolbar button

image

Changing the actions in a Recorded Method

If you have recorded something that needs to change, because the application changed or you recorded some action that shouldn?t be in the test, you may rerecord the actions and replace the old method.

First open the browser and navigate to the page you want to modify.

Right click on the <page>Map.uitest file and select Edit with Coded UI Test Builder

image

Record your actions but this time we want to reuse the existing method. Click the drop down arrow and select your method

image

Notice the button becomes ?Replace and Generate?.

image


Comments (5)

Anitha 8/2/2011 6:23 AM

hi,
if i double click on the map.uitest file, it is opening as an xml file ,i am not getting the window what is shown very fist.pls help.

Thank you

Anitha 8/2/2011 7:53 AM

unable to get the UI Map editor  but it is opening an xml file

tim star 9/14/2011 5:11 PM

Anitha,

The UI Map editor is new with Feature pack 2.  See this post for details: www.edsquared.com/.../...r+For+Coded+UI+Tests.aspx
Feature Pack 2 is available only to active MSDN Subscribers

Tim 9/19/2011 12:32 PM

The Coded UI map editor is available in feature pack 2 and Feature Pack 2 is available to active MSDN Subscribers.
www.edsquared.com/.../...r+For+Coded+UI+Tests.aspx

Tim 9/29/2011 11:07 AM

In order to get the UI Map editor you must have feature pack 2 installed. Feature Pack 2 requires either a VS Ultimate + MSDN, a VS Premium + MSDN subscription or a Test Professional + MSDN subscription.



msdn.microsoft.com/en-us/library/gg269474.aspx

Add a Comment

*

*

Loading

Find Us
Contact Us 651-288-7000 1-800-866-9884
Home | Training | Curriculum | Course Finder | Schedule | Enroll | Twin Cities Java User Group | Consulting | Foundation | Jobs | About Us | Our Story | Press Room | Instructors | President | Map & Directions | Sitemap

Java Training | JSF / Struts / Spring / Hibernate Training | Java Power Tools Training | .NET 4.0 & Visual Studio 2010 Training | Microsoft Web Development Training | Prism / MVVM / MEF Training | .NET 3.5 and Visual Studio 2008 Training | .NET 2.0 and Visual Studio 2003 Training | Cloud Computing Training | Ajax / Web Services / XML Training | Groovy and Grails Training | SQL Server 2012 Training | SQL Server 2008 Training | SQL Server 2005 Training | Mobile Development Training | SharePoint 2010 Training | SharePoint 2007 Training | Agile, Process, Analysis & Design Training | Arch/Design Patterns Training | Microsoft Official Curriculum Training | Web Development Training | Ruby Training | Rational Application Developer (RAD) Training | WebSphere Application Server Training | WebSphere Portal Training | WebLogic Training | Boot Camp Training | Project Management Training | C / C++ Training | Metro / WinRT / Windows 8 Development Training | Retired

Intertech delivers training on-site and virtually serving cities including Phoenix, AZ | San Francisco, CA | Los Angeles, CA | San Diego, CA | San Jose, CA | Washington, DC | Chicago, IL | Orlando, FL | Boston, MA | Duluth, MN | Minneapolis St. Paul, MN | Rochester, MN | Raleigh-Durham, NC | New York, NY | Philadelphia, PA | Austin, TX | Dallas, TX | Houston, TX | Seattle, WA.