• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Making money with CodedUI
 

Making money with CodedUI

on

  • 2,456 views

My slide deck from the Sept 2010 Dev4Dev's talk. The slides are pretty basic just an introduction to the topic, the meat is in the demo's (and some hidden slides)....

My slide deck from the Sept 2010 Dev4Dev's talk. The slides are pretty basic just an introduction to the topic, the meat is in the demo's (and some hidden slides).

Dev4Dev's is a Microsoft event where you only get 20min to present, which is why this is so short.

More details on this at http://www.sadev.co.za

Statistics

Views

Total Views
2,456
Views on SlideShare
2,061
Embed Views
395

Actions

Likes
0
Downloads
11
Comments
0

4 Embeds 395

http://www.sadev.co.za 391
http://sadev.co.za 2
http://webcache.googleusercontent.com 1
http://translate.googleusercontent.com 1

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

CC Attribution-ShareAlike LicenseCC Attribution-ShareAlike License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Making money with CodedUI Making money with CodedUI Presentation Transcript

    • Making money with Coded UI
    • Setup
      Visual Studio with BreakWPF
      Visual Studio clean
      IIS Express running for Xbox 360 Super Store
      Firefox & IE – make sure the cart is empty!
      Copy TestValues.xml to desktop
      ZoomIT
    • Demo 1 – Basic
      File -> New -> Test Project
      Delete unittest.cs
      Add new item -> coded ui test
      Record actions – explain the control
      Record on -> start -> calc.exe (point out tooltips) -> put in some calculations into the calc. when done stop recording
      Click show steps - > click generate method
      Click the assertions pointer – point to total – then add assert to display text add a list item too.
      Click generated method and close the builder
      Tour the code
      • CodedUITest1.cs Test method show the two methods
      • UIMap.uitest – the XML
      • UIMap.Designer.cs – The two methods there were it sends keys and asserts.
      Test -> Run -> All tests in solution (Ctrl R,A) – HANDS OFF
      Show test results
    • Demo 2 – Breaking CUIT
      Kick off the break wpf app
      Remove the current files from the test project -> Add new coded ui test -> Record actions -> start recording
      Click good button -> stop recording -> generate method
      Add assert of message display test -> generate method -> close builder
      Close breakwpf and move the buttons around -> run the application
      Run the test (Ctrl+R,A) -> show it works
      Close breakwpf and remove the name property from the good button -> run breakwpf -> run test -> BROKEN!
      Would need to rerecord the system – which is why asserts are separate
    • Demo 3 – Data Driven UI
      Clean out test project
      Make sure no IE instances are open
      Add new coded UI -> record action -> start record
      Open a new IE instances -> Go to http://localhost:9000 -> Then go to http://localhost:9000/Profile/Logout
      Click profile -> login -> click catalog -> click add fifa to cart -> change quantity to 2 -> press tab -> click check out
      PAUSE recording -> Generate code (name: LoginToConfirm)
      Assert Quantity Cell and Total Cost Cell Inner Text values -> Generate code (name: ValidateResults)
      Resume recording
      Click confirm checkout -> click profile -> click logout
      Pause recording -> generate code (name: cleanup)
      Close builder
      Test (menu) -> Windows -> Test View -> Right click on test and go properties -> Set Data Connection String to testvalues.xml
      Point out attribute
      Add following code:
      this.UIMap.LoginToConfirmParams.UIQuantityEditText = TestContext.DataRow["quantity"].ToString();this.UIMap.ValidateResultsExpectedValues.UIItem2CellInnerText = TestContext.DataRow["quantity"].ToString();this.UIMap.ValidateResultsExpectedValues.UIItem119800CellInnerText = TestContext.DataRow["total"].ToString();BrowserWindow.CurrentBrowser = "Firefox";
      Press Ctrl+F5
      Show test tesults and image
    • Factoids
      Coded UI tests are available in Premium and Ultimate
      It uses different kinds of accessibility mechanisms for different tech apps – IEDOM for web apps, MSAA for winforms, UIA for WPF
      Platforms supported on are available at Gautam’s blog
      Supports 2 different langs – C# and VB.NET
      Can construct tests from scratch via handcoding using the APIs – no specialized classes needed
      The core parts of the engine for Coded UI has been used extensively in DevDiv for writing automated tests since several years – this is a well tested reliable piece of technology
      Recording in CUIT is intent aware – so, the aggregations are smart enough to guess the intent of users. Eg: LaunchApp
      Resilience is built into the engine in many ways – smartmatch is one of them. It deconstructs the window title and matches it in parts to deal with title changing windows
      The VSTLM team uses coded UI tests for their own UI automation and have several hundreds of UI tests that drive Visual Studio and MTM using coded UI
      Coded UI tests can also employ multiple UI maps to help segregate code by UI components and allow multiple testers to work on them
      You can run Coded UI as part of your build
      You cannot record actions if the application is run under different user credentials
      You can use Win+I to select controls under the mouse
    • Coded UI Factoids
      • Coded UI tests are available in Premium and Ultimate
      • It uses different kinds of accessibility mechanisms for different tech apps – IEDOM for web apps, MSAA for winforms, UIA for WPF
      • Platforms supported on are available at Gautam’s blog
      • Supports 2 different langs – C# and VB.NET
      • Can construct tests from scratch via handcoding using the APIs – no specialized classes needed
      • The core parts of the engine for Coded UI has been used extensively in DevDiv for writing automated tests since several years – this is a well tested reliable piece of technology
      • Recording in CUIT is intent aware – so, the aggregations are smart enough to guess the intent of users. Eg: LaunchApp
      • Resilience is built into the engine in many ways – smartmatch is one of them. It deconstructs the window title and matches it in parts to deal with title changing windows
      • The VSTLM team uses coded UI tests for their own UI automation and have several hundreds of UI tests that drive Visual Studio and MTM using coded UI
      • Coded UI tests can also employ multiple UI maps to help segregate code by UI components and allow multiple testers to work on them
    • Who am I?
      Robert MacLean
      http://www.sadev.co.za
      I may talk a little fast
    • Overture
      New in Visual Studio 2010!
      3 Aspects of Coded UI
      Coded UIBasics
      Breaking Coded UI
      Data Driven Coded UI
      Please hold questions for the end 
    • I came for the money!
      Coded UI will save you time
    • Coded UI
    • Warning
      You need Visual Studio Premium or Ultimate for this!
    • Requirements
      OS: Win XP SP 3+
      Arch: x32 or x64
      Apps: IE 7+, Firefox, WinForms, WPF, Win32, MFC, SharePoint, Ax, Citrix, Terminal Services