SlideShare a Scribd company logo
1 of 6
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  ,[object Object]
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

More Related Content

More from Robert MacLean

More from Robert MacLean (20)

Looking at the Vue
Looking at the VueLooking at the Vue
Looking at the Vue
 
Kotlin 101
Kotlin 101Kotlin 101
Kotlin 101
 
Features of Kotlin I find exciting
Features of Kotlin I find excitingFeatures of Kotlin I find exciting
Features of Kotlin I find exciting
 
JavaScript Gotchas
JavaScript GotchasJavaScript Gotchas
JavaScript Gotchas
 
DevConf Survival Guide
DevConf Survival GuideDevConf Survival Guide
DevConf Survival Guide
 
The state of testing @ Microsoft
The state of testing @ MicrosoftThe state of testing @ Microsoft
The state of testing @ Microsoft
 
Visual Studio ❤ JavaScript
Visual Studio ❤ JavaScriptVisual Studio ❤ JavaScript
Visual Studio ❤ JavaScript
 
What is new in C# 6?
What is new in C# 6?What is new in C# 6?
What is new in C# 6?
 
Putting the DOT in .NET - Dev/Ops/Test
Putting the DOT in .NET - Dev/Ops/TestPutting the DOT in .NET - Dev/Ops/Test
Putting the DOT in .NET - Dev/Ops/Test
 
A Developer Day 2014 - Durban
A Developer Day 2014 - Durban A Developer Day 2014 - Durban
A Developer Day 2014 - Durban
 
Agile lessons learned in the Microsoft ALM Rangers
Agile lessons learned in the Microsoft ALM RangersAgile lessons learned in the Microsoft ALM Rangers
Agile lessons learned in the Microsoft ALM Rangers
 
Hour of code - Train the trainer
Hour of code - Train the trainerHour of code - Train the trainer
Hour of code - Train the trainer
 
Building services for apps on a shoestring budget
Building services for apps on a shoestring budgetBuilding services for apps on a shoestring budget
Building services for apps on a shoestring budget
 
3 things your app API is doing WRONG
3 things your app API is doing WRONG3 things your app API is doing WRONG
3 things your app API is doing WRONG
 
ASP.NET
ASP.NETASP.NET
ASP.NET
 
LightSwitch
LightSwitchLightSwitch
LightSwitch
 
How to build a Mobile API or HTML 5 app in 5 minutes
How to build a Mobile API or HTML 5 app in 5 minutesHow to build a Mobile API or HTML 5 app in 5 minutes
How to build a Mobile API or HTML 5 app in 5 minutes
 
Protection of Personal Information Bill (POPI)
Protection of Personal Information Bill (POPI)Protection of Personal Information Bill (POPI)
Protection of Personal Information Bill (POPI)
 
Open Source Licensing
Open Source LicensingOpen Source Licensing
Open Source Licensing
 
How to give a great presentation
How to give a great presentationHow to give a great presentation
How to give a great presentation
 

Recently uploaded

Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
panagenda
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Peter Udo Diehl
 

Recently uploaded (20)

1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
 
Using IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & IrelandUsing IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & Ireland
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
 
TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024
 
AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101
 
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi IbrahimzadeFree and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
 
Designing for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at ComcastDesigning for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at Comcast
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
 
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfThe Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
 
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
 
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
 
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
 
Google I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGoogle I/O Extended 2024 Warsaw
Google I/O Extended 2024 Warsaw
 
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM Performance
 
AI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří KarpíšekAI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří Karpíšek
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
 
What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024
 
Oauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoftOauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoft
 

Making money with CodedUI

  • 1. Making money with Coded UI
  • 2. 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
  • 3.
  • 5. 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
  • 6. 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
  • 7. 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
  • 8. 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
  • 9.
  • 10. It uses different kinds of accessibility mechanisms for different tech apps – IEDOM for web apps, MSAA for winforms, UIA for WPF
  • 11. Platforms supported on are available at Gautam’s blog
  • 12. Supports 2 different langs – C# and VB.NET
  • 13. Can construct tests from scratch via handcoding using the APIs – no specialized classes needed
  • 14. 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
  • 15. Recording in CUIT is intent aware – so, the aggregations are smart enough to guess the intent of users. Eg: LaunchApp
  • 16. 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
  • 17. 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
  • 18.
  • 19. 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 
  • 20. I came for the money! Coded UI will save you time
  • 22. Warning You need Visual Studio Premium or Ultimate for this!
  • 23. Requirements OS: Win XP SP 3+ Arch: x32 or x64 Apps: IE 7+, Firefox, WinForms, WPF, Win32, MFC, SharePoint, Ax, Citrix, Terminal Services