Using CodedUITest in Visual Studio 2010
Since the company I work for doesn’t have a big QA presence (we’re working on it), it’s often the case that UI changes break things with no one being aware of it.
I’m not a giant fan of automated UI tests, my brief experience with them has shown them to be brittle. Regardless, I was still excited when the CodedUITest functionality was baked into Visual Studio 2010.
Here’s how things have gone for me so far:
1. Rookie mistake, don’t launch your web application in debug mode. If you do, you won’t be able to generate the code from what you have recorded.
2. Make the first action be to click on the browser to bring it into focus.
3. Like all unit tests, keep the assertions small. The first test I got to run successfully only checked that after I logged in, my name was in the welcome tag.
I’m going to be trying this feature out over the next couple of weeks and hope to post something more substantive on it. Maybe one of those vaunted series of posts all the cool kids do.

Leave a Reply