Coded UI Tests can fail for a number of reasons, producing detailed logs that can be used to rapidly identify what caused the failure. The interesting characteristic about the logs produced by the tests, is that each action results in a detailed entry consisting of information about the how to find the control, the technology used to find the control and a screenshot of the action including a red box above the control upon which the action is performed. These details can help identify if the CUIT has been able to find the right control. It can also help locate instances where the target control is missing.
Archives For Visual Studio 2012
If you are using Visual Studio 2012 and creating your model with Entity Framework 126.96.36.199+, this post is not for you. As of version 188.8.131.52 models are created using DbContext by default.
For those who are upgrading your projects to .Net 4.0 / .Net 4.5 and are currently using a model-first or
database-first EDMX model, you have the possibility of using a DbContext to query your ObjectContext.
When ever you have admin rights to your computer, be sure to run Visual Studio as Administrator. This will greatly reduce the number of headaches cause by tools who don’t react the way you expect them to.
Visual Studio is quirky when it comes to user rights. In some cases, it will misbehave and you might not notice it. One example of this can be observed when you are working with Coded UI Tests (CUIT), when Visual Studio is not running as Administrator, the recorder will not have access to all the control properties that are required. This can quickly lead you to think that the tool isn’t worth much!
Another instance where Visual Studio must be running as Administrator, is when you need to create a website under IIS from within Visual Studio. When it isn’t running under Administrator privileges, it will block you and warn you that you need elevated privileges. This is one of the rare instances where Visual Studio explicitly tells you that you that you are required to start it as an Administrator. This is because IIS requires elevated privileges.
These are but two examples of why it is so important to run Visual Studio as an Administrator.
The image to the right, shows
how to set
Visual Studio to always start as Administrator. Right click on the shortcut and go into the advanced… menu. Then be sure to check the Run as administrator check box.
Remember, when ever you have the possibility, it’s best run Visual Studio with full admin rights.