nico orschel consultant ait teamsystempro automatisches testen ohne frust mit codedui
TRANSCRIPT
![Page 1: Nico Orschel Consultant AIT TeamSystemPro Automatisches Testen ohne Frust mit CodedUI](https://reader035.vdocuments.site/reader035/viewer/2022062312/55204d7549795902118c9fef/html5/thumbnails/1.jpg)
Nico OrschelConsultantAIT TeamSystemPro
Automatisches Testen ohne Frust mit CodedUI
![Page 2: Nico Orschel Consultant AIT TeamSystemPro Automatisches Testen ohne Frust mit CodedUI](https://reader035.vdocuments.site/reader035/viewer/2022062312/55204d7549795902118c9fef/html5/thumbnails/2.jpg)
Was ist CodedUI?
Framework für UI TestautomatisierungVerfügbar ab Visual Studio 2010 Premium
Unterstützung verschiedener Technologien durch spezifische Provider (z.B. WinForms, WPF, Webanwendungen, Silverlight 4.0 )Microsoft Testmanager und CodedUI verwenden identisches Tracking-Framework
![Page 3: Nico Orschel Consultant AIT TeamSystemPro Automatisches Testen ohne Frust mit CodedUI](https://reader035.vdocuments.site/reader035/viewer/2022062312/55204d7549795902118c9fef/html5/thumbnails/3.jpg)
3
Unterstützte Plattformen
![Page 4: Nico Orschel Consultant AIT TeamSystemPro Automatisches Testen ohne Frust mit CodedUI](https://reader035.vdocuments.site/reader035/viewer/2022062312/55204d7549795902118c9fef/html5/thumbnails/4.jpg)
4
Tracking TechnologienTechnologie UI Test Implementierung
Windows Forms Microsoft Active Accessibility (MSAA)
Windows Presentation Foundation
UI Automation (UIA)
Internet Explorer MSHTML
Firefox JavaScript und Firefox DOM
Silverlight Code Injection und Reflection
![Page 5: Nico Orschel Consultant AIT TeamSystemPro Automatisches Testen ohne Frust mit CodedUI](https://reader035.vdocuments.site/reader035/viewer/2022062312/55204d7549795902118c9fef/html5/thumbnails/5.jpg)
UITest Architecture
5
Web Plug-ins(MSHTML/DOM)
Interpreter
Coded UI Test
Code Generation
Test Runner
PlaybackRecorder
Rich Client Plug-ins(UIA/MSAA)
Filter/ Aggregation
Rules
APIProperty Provider
3rd Party Plug-ins
Action Invoker
My UI
Custom properties & code
Customize recording
Write a client that does something else!
Technology Abstraction Layer
Add/Modify API
Write technology adapters
![Page 6: Nico Orschel Consultant AIT TeamSystemPro Automatisches Testen ohne Frust mit CodedUI](https://reader035.vdocuments.site/reader035/viewer/2022062312/55204d7549795902118c9fef/html5/thumbnails/6.jpg)
6
MSAA
MSAA = Microsoft Assessabilty AutomationStandard zur Ansteuerung von Anwendungen für ScreenreaderVerfügbar/Bestandteil seit Windows 95
Testautomatisierung von WinForms Controls erfolgt über MSAAWichtige Properties im Zusammenhang mit Testautomatisierung
AccessabiltyName und AccessabiltyDescription
![Page 7: Nico Orschel Consultant AIT TeamSystemPro Automatisches Testen ohne Frust mit CodedUI](https://reader035.vdocuments.site/reader035/viewer/2022062312/55204d7549795902118c9fef/html5/thumbnails/7.jpg)
Accessabilty Problemdiagnose
Probleme mit den Standards MSAA und UIA ohne Hilfsmittel schwierig zu identifizierenDiagnose mit folgenden Programmen möglich
Custom ToolUISpy (nur MSAA, Windows SDK)AccChecker (UIA und MSAA Best Practice Scan)
Download unter https://acccheck.codeplex.com/
![Page 8: Nico Orschel Consultant AIT TeamSystemPro Automatisches Testen ohne Frust mit CodedUI](https://reader035.vdocuments.site/reader035/viewer/2022062312/55204d7549795902118c9fef/html5/thumbnails/8.jpg)
WinForms
demo…
![Page 9: Nico Orschel Consultant AIT TeamSystemPro Automatisches Testen ohne Frust mit CodedUI](https://reader035.vdocuments.site/reader035/viewer/2022062312/55204d7549795902118c9fef/html5/thumbnails/9.jpg)
Tip 1: MSAA: AccessibilityName und AccessibilityDescription zuweisen
9
![Page 10: Nico Orschel Consultant AIT TeamSystemPro Automatisches Testen ohne Frust mit CodedUI](https://reader035.vdocuments.site/reader035/viewer/2022062312/55204d7549795902118c9fef/html5/thumbnails/10.jpg)
Tip 2: ACChecker - dein Freund und Helfer (bei MSAA / UIA Problemen)
10
![Page 11: Nico Orschel Consultant AIT TeamSystemPro Automatisches Testen ohne Frust mit CodedUI](https://reader035.vdocuments.site/reader035/viewer/2022062312/55204d7549795902118c9fef/html5/thumbnails/11.jpg)
UIA
UIA = User Interface AutomationNachfolger des Standards MSAABestandteil des System ab Windows 2003 und VistaStandard WPF Controls (.NetFx 3.0 und neuer) implementieren UIA
UIA Properties AutomationId und AutomationName sind essentiel für die Testautomatisierung
Definition kann implizit oder explizit erfolgen
![Page 12: Nico Orschel Consultant AIT TeamSystemPro Automatisches Testen ohne Frust mit CodedUI](https://reader035.vdocuments.site/reader035/viewer/2022062312/55204d7549795902118c9fef/html5/thumbnails/12.jpg)
WPF
demo…
![Page 13: Nico Orschel Consultant AIT TeamSystemPro Automatisches Testen ohne Frust mit CodedUI](https://reader035.vdocuments.site/reader035/viewer/2022062312/55204d7549795902118c9fef/html5/thumbnails/13.jpg)
Tip 3: UIA: AutomationName und AutomationID zuweisen
13
![Page 14: Nico Orschel Consultant AIT TeamSystemPro Automatisches Testen ohne Frust mit CodedUI](https://reader035.vdocuments.site/reader035/viewer/2022062312/55204d7549795902118c9fef/html5/thumbnails/14.jpg)
Silverlight
Support für Silverlight 4.0 Anwendungen mit Feature Pack 2 verfügbar
Unterschiede zu WPFEinbindung der Assembly Microsoft.VisualStudio.TestTools.UITest.Extension.SilverlightUIAutomationHelper
Gemeinsamkeiten mit WPF: AutomationProperties analog zu WPF
AutomationIdAutomationName
![Page 15: Nico Orschel Consultant AIT TeamSystemPro Automatisches Testen ohne Frust mit CodedUI](https://reader035.vdocuments.site/reader035/viewer/2022062312/55204d7549795902118c9fef/html5/thumbnails/15.jpg)
Silverlight
demo…
![Page 16: Nico Orschel Consultant AIT TeamSystemPro Automatisches Testen ohne Frust mit CodedUI](https://reader035.vdocuments.site/reader035/viewer/2022062312/55204d7549795902118c9fef/html5/thumbnails/16.jpg)
Tip 4: UIA: AutomationName und AutomationID zuweisen
16
![Page 17: Nico Orschel Consultant AIT TeamSystemPro Automatisches Testen ohne Frust mit CodedUI](https://reader035.vdocuments.site/reader035/viewer/2022062312/55204d7549795902118c9fef/html5/thumbnails/17.jpg)
Web
Erweiterung für das CodedUI FrameworkUrsprung: Microsoft Product Group
Vereinfacht die Entwicklung und Wartung von automatischen Tests (von Webanwendungen)Vorteil
“Keine” UIMap mehr notwendigWeniger, lesbarer und warbarerr CodeAusführen von JavaScript Code
![Page 18: Nico Orschel Consultant AIT TeamSystemPro Automatisches Testen ohne Frust mit CodedUI](https://reader035.vdocuments.site/reader035/viewer/2022062312/55204d7549795902118c9fef/html5/thumbnails/18.jpg)
Web
demo…
![Page 19: Nico Orschel Consultant AIT TeamSystemPro Automatisches Testen ohne Frust mit CodedUI](https://reader035.vdocuments.site/reader035/viewer/2022062312/55204d7549795902118c9fef/html5/thumbnails/19.jpg)
Tip 5: Wartbarer Testautomation-Code mit CUITe
19
![Page 20: Nico Orschel Consultant AIT TeamSystemPro Automatisches Testen ohne Frust mit CodedUI](https://reader035.vdocuments.site/reader035/viewer/2022062312/55204d7549795902118c9fef/html5/thumbnails/20.jpg)
Tip 6: “If you don’t know what you want tested, how are you going to automate it?”
![Page 21: Nico Orschel Consultant AIT TeamSystemPro Automatisches Testen ohne Frust mit CodedUI](https://reader035.vdocuments.site/reader035/viewer/2022062312/55204d7549795902118c9fef/html5/thumbnails/21.jpg)
Please help us make TechDays even better by Evaluating this Session. Thank you!
Give us your feedback!
![Page 23: Nico Orschel Consultant AIT TeamSystemPro Automatisches Testen ohne Frust mit CodedUI](https://reader035.vdocuments.site/reader035/viewer/2022062312/55204d7549795902118c9fef/html5/thumbnails/23.jpg)
© 2011 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.
The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after
the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
![Page 24: Nico Orschel Consultant AIT TeamSystemPro Automatisches Testen ohne Frust mit CodedUI](https://reader035.vdocuments.site/reader035/viewer/2022062312/55204d7549795902118c9fef/html5/thumbnails/24.jpg)
Weiterführende Informationen
AIT Gmbh & Co. KGhttp://www.aitgmbh.de
Artikelserie zu CodedUI Optimierunghttp://blog.aitgmbh.de/2011/01/07/codedui-diagnose-von-msaa-oder-uia-problemen-in-anwendungen-teil-1/http://blog.aitgmbh.de/2011/01/20/codedui-wpf-anwendungen-fr-codedui-vorbereiten-teil-2/http://blog.aitgmbh.de/2011/01/28/codedui-winforms-anwendungen-fr-uitest-vorbereiten-teil-3/
Set a Unique Automation Property for Silverlight Controls for Testinghttp://msdn.microsoft.com/en-us/library/gg413373.aspx
![Page 25: Nico Orschel Consultant AIT TeamSystemPro Automatisches Testen ohne Frust mit CodedUI](https://reader035.vdocuments.site/reader035/viewer/2022062312/55204d7549795902118c9fef/html5/thumbnails/25.jpg)
Weiterführende Informationen
CUITe (Coded UI Test enhanced) Frameworkhttps://cuite.codeplex.com/
UI Accessibility Checkerhttps://acccheck.codeplex.com/
Using UI Automation for Automated Testinghttp://msdn.microsoft.com/en-us/library/aa348551.aspx