Wednesday, May 18, 2011

Test Automation with Visual Studio 2010: Coded UI tests (CUIT) and Lab Management

This may be a little unrealistic for us but here is what I gathered from the session:



  • Need VS Premium or Ultimate to use. Also they recommend Feature Pack 2

  • Create a new Test project in VS, then add a UITest. At this point you are presented with either "record actions" option, or "use existing action recording" option. The second option can be from a manual test case (see yesterday's blog).

  • Record actions allows you to record everything you do on on the machine while interacting with an application. Such as open app, type "Hello world" in textbox, click button...etc.

  • Then you click on generate coded UI test and it writes code in your test project for you. Interestingly, the presenter Brian Keller, stated that Microsoft has been using the technology to test their app for 15 years.

  • At this point you can modify the test code, by writing assert stuff, where you can use the test case tool to select a control and tell it to watch this control for a certain value.

  • The tests are run "as quickly as possible" meaning that it will wait until callbacks come back and everything before it moves on to the next steps. You can also insert delays into the tests.

  • The UIMap tool can be used to view the test steps and these can be modified and deleted from here.

  • The steps can be broken out into individual methods (by default they are all rolled into one).

  • You can configure the steps to "continue on error". By default this property is set to false.

  • You can use test parameters which can be hard coded or looked up from a datasource, such as a database or CSV or XLS files

  • You can also configure to capture images at certain steps, which can then be saved with the test results. These can then be reviewed by a real live person to make sure the interface is running smoothly.

No comments:

Post a Comment