简体   繁体   中英

Data Driven Coded UI Testing in Visual Studio

I am curious about an issue in Coded UI Testing. For example I created a button named Button1. I did assertions and everything is fine. Then I changed this button's name to Button2. Now, do I have to write my assertions again or is Coded UI Test can suit in every different name change. Notice that I am not doing any input or parameter changes, I am just changing user interface. Thanks for your replies.

You should be able to change the test code easily to cope with a name change like that. Open the UI Map file in the UI Map editor; ie double-click on the uimap.uitest file in solution explorer. In the left hand pane expand the method and select the action that clicks the button. That should open the relevant control in the right hand pane. Alternatively just find the control for the button in the right pane. View the properties of the button and click on the ellipsis of the "(collection)" value of SearchProperties or the FilterProperties . One of the items shown should be the old name of the button, just rename it there.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM