I would like to start a discussion on using UI tests in VSTS. Any information that can help testers understand and create better UI tests using VSTS 2010 UI tests feature would be greatly appreciated.
To start with if anyone can give a walkthrough on the various components of the UI test.
PankajWednesday, December 09, 2009 2:01 PM
A quick (but bit old) video of the feature is at - http://channel9.msdn.com/shows/10-4/10-4-Episode-18-Functional-UI-Testing/
Mathew has some useful blogs at http://blogs.msdn.com/mathew_aniyan/
Apart from these, if you use this Bing search, you will find lot more - http://www.bing.com/search?q=%22coded+UI+test%22&form=QBRE&qs=n
Thanks, Gautam http://blogs.msdn.com/gautamgWednesday, December 09, 2009 2:21 PM
Thanks Gautam for such a quick response. I am going through the blogs and they are indeed helpful.
Would appreciate any insites on the various components(eg. the .cs files) generated after recording and the various autogenerated classes, methods etc.
One more thing, how can we extract some text/value from the web page and save it for further use in the tests. eg. There is a text "Hello" on the web page and I want to save it to reuse.
Thanks again for your inputs.
PS: "Hand-coding a Coded UI Test" by Mathew helpful. Looking for something more on the same lines :)Wednesday, December 09, 2009 2:38 PM
I am not sure whether I got your point or not but that way I can get the value while recording (by putting some assertion) and then its reflected in the code but it is then an hardcoded value. I need to extract the value on run time. I want that the value gets stored in some variable while my test is executing. In my case there is some text on the page that is dynamic. I need to fetch that text string from the web page on the run time and use that value later on in my test.
PankajFriday, December 11, 2009 11:08 AM
That will definitely help in my case. I am trying to figure out how I can store this value and use it later in other test script. I need to pass on the retrieved values to other tests. I need to understand the structure of the Coded UI tests and its flow. Its a bit tedius to identify the controls as the tool generates a lot of code for every single control.
Thanks for everyone's inputs. I will keep on seeking help from you guys :-)
PankajFriday, December 11, 2009 5:17 PM
I again need your inputs. I am having one small test where in I need to login with some username and password. I want to make this as a general purpose method that can be re-used. I created a method that takes username and password as arguments. But my problem lies in the fact that the coded UI test accepts some encrypted (encoded) string instead of the actual string that i pass as a password. This string is generated while recording. Any pointers on how I can generate this encrypted string from my actual password string.
Only way out for me at present is to record my login sequence with the new password that i want to use and then use the generated encrypted value but that obviously is not a good way.
PankajMonday, December 14, 2009 5:26 PM
Please create new thread for new issue. It makes tracking the question easier on our side and you will get faster response back.
For your issue, check http://social.msdn.microsoft.com/Forums/en-US/vsautotest/thread/72dbc0bc-8284-467b-8d49-6f858b56e6f6
http://blogs.msdn.com/gautamgWednesday, December 16, 2009 6:49 AM
very helpful info..
Also try this:
http://blogs.msdn.com/b/mathew_aniyan/archive/2010/02/11/content-index-for-coded-ui-test.aspx and http://blogs.msdn.com/b/gautamg/archive/2010/02/19/useful-set-of-utility-functions-for-coded-ui-test.aspx
samWednesday, July 14, 2010 4:16 AM