SlideShare a Scribd company logo
Automatic Testing using the Coded UI Framework
Lesson 1 - Overview
Omer Karpas
Abbreviations and Professional
Terms (Glossary)
Abbreviation or term Definition
KDT Keywords Driven Testing
AUT Application Under Test
VS Visual Studio
BB Building Block
GUI Graphical User Interface
VB Visual Basic
CUIT Coded UI Test
TC Test Case
Scenario Synonym for Test Case
Keyword Driven Testing
 In KDT (keyword-driven testing), each keyword
corresponds to an individual testing Action or Verification.
 Examples:
 A mouse click
 Selection of a menu item
 Keystrokes
 Opening or closing a window
 Verifying a control is visible
 Verifying a control is enabled
 Etc…
Keyword Driven Testing
 A keyword-driven test is a sequence of keywords, that
simulate user actions on the AUT (Application Under
Test).
 Basically, to create a test, testers simply order the
corresponding keywords of the desired Actions and
Verifications.
 Keywords are commonly called Modules or BB
(Building Blocks).
Keyword Driven Testing
 Pros:
 Reuse of code
 Allows non-coding personals to build scenarios from the
BB.
 Much easier maintenance
 Cons:
 Takes more coding time
 Conclusion – KDT is the way to go!
Microsoft Coded UI Framework
 create automated tests of the user interface (UI). These
tests provide functional testing of the user interface.
Automated UI tests enable you to test that the user
interface is functioning correctly.
Microsoft Coded UI Framework
 Coded UI is a Framework designed to provide
developers a way to:
 Interact with the AUT (application under test) Controls,
to get their state, values etc..
 Interact with the AUT Controls, to Set their state, values
etc..
 Run their automatic TC (Test Cases).
Microsoft Coded UI Framework
 Coded UI Framework can handle Controls of the
following types:
 WinForms
 HTML
 WPF (Windows Presentation Foundation)
 This is a big advantage of Coded UI because currently
the only other tool that handles Custom controls of
WPF is QTP.
Microsoft Coded UI Framework
 Coded UI tests can be written in VB.NET (Visual
Basic) or in C# (C-Sharp).
 Coded UI tests can be run separately or as an
automated package.
 Coded UI tests can be coded manually or by recording
Tests using the Coded UI Test Builder.
Microsoft Coded UI Framework
 Using the KDT approach is up to the developer.
 Coded UI framework have very limited special features
to support coding with KDT in mind, but it is still
highly recommended.
Recording VS Manually Automating
 In general, there are two ways to create Automatic tests
with the Coded UI framework.
 By using the “Coded UI Test Builder”
 Recording your actions on the AUT and adding
assertions(Verifications) – all without any coding involved.
 Currently, the framework is not sufficient in recognizing
custom controls, and mapping large scale applications.
Recording VS Manually Automating
 this way is not compatible with KDT approach, since we will
need to record each scenario from start to end (no reuse of
code).
 For example, if we need to add another step to some of our
CUITs (Coded UI Tests), we will need to record those tests
again, from scratch, or we will need to manually code those
actions and copy past the code across all tests,
 Instead, by using KDT, we would just update one of our
Modules.
Recording VS Manually Automating
 Writing code using coding capabilities – and this is
what we will learn in this course.
What you need (Prerequisites)
 Visual Studio 2010 Ultimate or Visual Studio 2010
Premium or newer versions of Visual Studio.
 SQL express (can be installed as part of the VS2010
installations).
Creating a new Coded UI Project
 Open Microsoft Visual Studio 2010 Ultimate (or
newer)
 Start a new testing project: “File” -> “New Project…” .
 In the New Project window, select “Visual C#”-> “Test”,
enter a name for the Project and press the OK button
to create the test project.
Creating a new Coded UI Project
Creating a new Coded UI Project
 Close the “UnitTest.cs” window
 Right click on the “UnitTest.cs” in the “Solution
Explorer” and select Delete.
Project Entities
 There are 3 types of entities to our project :
 Control Mapping.
 Implementation.
 Modules.
Control Mapping
 The control mapping file contains all the AUD
controls.
 Most of the controls are mapped in the controls file,
but not all, because some can only be detected in run
time.
Control Mapping
 Each class in the file is a single control mapping, or
else, when using it, we will get an exception (error).
 The file is like a family graph where each control has
its direct childes mapped in its class.
 All controls are children’s of the main program window
class.
Implementation
 The implementation file contains a single static class
that contains all the methods (Actions and
Verifications) that we want to run on the AUT.
 Examples:
 Open application.
 Click abc button.
 Set xyz textbox to “123”.
Modules
 Each Module file is a “CodedUITest” class.
 Each Module contains a call to one method from the
Implementation File.
 Modules are the Automatic TC building blocks.
Modules
 Examples:
 Open application.
 Click abc button.
 Set xyz textbox to ValueFromUser.
Test Case (Scenario)
 The Test Case file contains calls to Modules in a
specific flow to verify the requested functionality.
 Example:
 Open the application.
 Click abc button.
 Verify Label text is “123”.
Recommended reading
 Addison Wesley, “Software Testing with Visual Studio
2010”.
 http://blogs.msdn.com/b/mathew_aniyan/archive/201
3/02/18/content-index-for-coded-ui-test.aspx
 ‫ועוד‬ ‫אתרים‬ ‫וידיאו‬ ‫ספרים‬..
Coded ui - lesson 1 - overview
exercises
 Create a new Coded UI Project.
 Define the following abbreviations:
 KDT-
 AUT-
 VS-
 BB-
 GUI-
 VB-
 CUIT-
 TC-
exercises
 Write the 4 types of areas of the automation project,
and explain each one of them in your own words.

More Related Content

What's hot (20)

PPTX
Coded ui - lesson 6 - manual coding
Omer Karpas
 
PPTX
Coded ui - lesson 3 - case study - calculator
Omer Karpas
 
PPT
UI testing frameworks and the Coded UI testing paradigm
Arnold Stellio
 
PPTX
Unit testing with visual studio 2012
Abhimanyu Singhal
 
PPTX
Testing the User Interface - Coded UI Tests with Visual Studio 2010
Eric D. Boyd
 
PDF
Technical meeting automated testing with vs2010
Clemens Reijnen
 
PPTX
Test Tooling in Visual Studio 2012 an overview
Clemens Reijnen
 
PPTX
Deep Dive Modern Apps Lifecycle with Visual Studio 2012: How to create cross ...
Microsoft Developer Network (MSDN) - Belgium and Luxembourg
 
PPTX
Remote Test Execution using TFS 2015 (RC2 and beyond)
Allen Mathias
 
PPTX
Coded ui - lesson 5 - ui map
Omer Karpas
 
PPT
MTM Test Management System
Minu Mishra
 
PPT
Testing with test_complete
binuiweb
 
PPTX
Testing tools in visual studio
Mahdi Esmailoghli
 
PPSX
QA with Microsoft Test Manager and Lab Management
Rofiqi Setiawan
 
PPTX
Automation Testing with TestComplete
RomSoft SRL
 
DOC
Getting started with test complete 7
Hoamuoigio Hoa
 
PPTX
Lab Management with TFS 2010
Ed Blankenship
 
PPSX
Test Complete
RomSoft SRL
 
PPT
Active x
andrew20827
 
DOCX
Case study on testing
Shivani Joshi
 
Coded ui - lesson 6 - manual coding
Omer Karpas
 
Coded ui - lesson 3 - case study - calculator
Omer Karpas
 
UI testing frameworks and the Coded UI testing paradigm
Arnold Stellio
 
Unit testing with visual studio 2012
Abhimanyu Singhal
 
Testing the User Interface - Coded UI Tests with Visual Studio 2010
Eric D. Boyd
 
Technical meeting automated testing with vs2010
Clemens Reijnen
 
Test Tooling in Visual Studio 2012 an overview
Clemens Reijnen
 
Deep Dive Modern Apps Lifecycle with Visual Studio 2012: How to create cross ...
Microsoft Developer Network (MSDN) - Belgium and Luxembourg
 
Remote Test Execution using TFS 2015 (RC2 and beyond)
Allen Mathias
 
Coded ui - lesson 5 - ui map
Omer Karpas
 
MTM Test Management System
Minu Mishra
 
Testing with test_complete
binuiweb
 
Testing tools in visual studio
Mahdi Esmailoghli
 
QA with Microsoft Test Manager and Lab Management
Rofiqi Setiawan
 
Automation Testing with TestComplete
RomSoft SRL
 
Getting started with test complete 7
Hoamuoigio Hoa
 
Lab Management with TFS 2010
Ed Blankenship
 
Test Complete
RomSoft SRL
 
Active x
andrew20827
 
Case study on testing
Shivani Joshi
 

Similar to Coded ui - lesson 1 - overview (20)

PDF
Getting Started With Coded UI testing: Building Your First Automated Test
Imaginet
 
PPTX
Getting Started with Coded UI Testing: Building Your First Automated Test
Imaginet
 
ODP
Alexandre.iline rit 2010 java_fxui_extra
rit2010
 
ODP
Alexandre Iline Rit 2010 Java Fxui
rit2010
 
PDF
New trends in testing automation
Eran Kinsbrunner
 
PPT
Innovative Test Automation Solution
Alan Lee White
 
PDF
Microsoft Testing Tour - Functional and Automated Testing
Angela Dugan
 
PPTX
Getting Started with Visual Studio’s Coded UI Testing: Building Your First Au...
Imaginet
 
PDF
MTLM Visual Studio 2010 ALM - day2
Clemens Reijnen
 
PPTX
Testing ASP.NET - Progressive.NET
Ben Hall
 
PDF
Automating JFC UI application testing with Jemmy
SPB SQA Group
 
PPT
Automated Software Testing Framework Training by Quontra Solutions
Quontra Solutions
 
PDF
Keyword Driven Testing
Harish MS
 
PPTX
Udvid din test portefølje med coded ui test og cloud load test
Peter Lindberg
 
ODP
Alexandre Iline Rit 2010 Java Fxui
guest092df8
 
PPTX
Coding Naked
Caleb Jenkins
 
PPT
Test planning and software's engineering
MansiganeshJawale
 
PDF
Introduction to Test Automation - Technology and Tools
KMS Technology
 
PPTX
How ui ux testing will transform your project into a raging success
Concetto Labs
 
PDF
Testar2014 presentation
Tanja Vos
 
Getting Started With Coded UI testing: Building Your First Automated Test
Imaginet
 
Getting Started with Coded UI Testing: Building Your First Automated Test
Imaginet
 
Alexandre.iline rit 2010 java_fxui_extra
rit2010
 
Alexandre Iline Rit 2010 Java Fxui
rit2010
 
New trends in testing automation
Eran Kinsbrunner
 
Innovative Test Automation Solution
Alan Lee White
 
Microsoft Testing Tour - Functional and Automated Testing
Angela Dugan
 
Getting Started with Visual Studio’s Coded UI Testing: Building Your First Au...
Imaginet
 
MTLM Visual Studio 2010 ALM - day2
Clemens Reijnen
 
Testing ASP.NET - Progressive.NET
Ben Hall
 
Automating JFC UI application testing with Jemmy
SPB SQA Group
 
Automated Software Testing Framework Training by Quontra Solutions
Quontra Solutions
 
Keyword Driven Testing
Harish MS
 
Udvid din test portefølje med coded ui test og cloud load test
Peter Lindberg
 
Alexandre Iline Rit 2010 Java Fxui
guest092df8
 
Coding Naked
Caleb Jenkins
 
Test planning and software's engineering
MansiganeshJawale
 
Introduction to Test Automation - Technology and Tools
KMS Technology
 
How ui ux testing will transform your project into a raging success
Concetto Labs
 
Testar2014 presentation
Tanja Vos
 
Ad

Recently uploaded (20)

PDF
Message Level Status (MLS): The Instant Feedback Mechanism for UAE e-Invoicin...
Prachi Desai
 
PDF
Introduction to Apache Iceberg™ & Tableflow
Alluxio, Inc.
 
PPTX
ChessBase 18.02 Crack + Serial Key Free Download
cracked shares
 
PDF
Instantiations Company Update (ESUG 2025)
ESUG
 
PDF
How to Download and Install ADT (ABAP Development Tools) for Eclipse IDE | SA...
SAP Vista, an A L T Z E N Company
 
PDF
SAP GUI Installation Guide for macOS (iOS) | Connect to SAP Systems on Mac
SAP Vista, an A L T Z E N Company
 
PPT
Brief History of Python by Learning Python in three hours
adanechb21
 
PPTX
Odoo Migration Services by CandidRoot Solutions
CandidRoot Solutions Private Limited
 
PDF
How to get the licensing right for Microsoft Core Infrastructure Server Suite...
Q-Advise
 
PDF
Why Are More Businesses Choosing Partners Over Freelancers for Salesforce.pdf
Cymetrix Software
 
PDF
Top 10 AI Use Cases Every Business Should Know.pdf
nicogonzalez1075
 
PDF
Enhancing Security in VAST: Towards Static Vulnerability Scanning
ESUG
 
PPTX
Operations Profile SPDX_Update_20250711_Example_05_03.pptx
Shane Coughlan
 
PPTX
Chess King 25.0.0.2500 With Crack Full Free Download
cracked shares
 
PPTX
API DOCUMENTATION | API INTEGRATION PLATFORM
philipnathen82
 
PDF
Ready Layer One: Intro to the Model Context Protocol
mmckenna1
 
PDF
Notification System for Construction Logistics Application
Safe Software
 
PDF
custom development enhancement | Togglenow.pdf
aswinisuhu
 
PDF
Optimizing Tiered Storage for Low-Latency Real-Time Analytics at AI Scale
Alluxio, Inc.
 
PDF
Understanding the EU Cyber Resilience Act
ICS
 
Message Level Status (MLS): The Instant Feedback Mechanism for UAE e-Invoicin...
Prachi Desai
 
Introduction to Apache Iceberg™ & Tableflow
Alluxio, Inc.
 
ChessBase 18.02 Crack + Serial Key Free Download
cracked shares
 
Instantiations Company Update (ESUG 2025)
ESUG
 
How to Download and Install ADT (ABAP Development Tools) for Eclipse IDE | SA...
SAP Vista, an A L T Z E N Company
 
SAP GUI Installation Guide for macOS (iOS) | Connect to SAP Systems on Mac
SAP Vista, an A L T Z E N Company
 
Brief History of Python by Learning Python in three hours
adanechb21
 
Odoo Migration Services by CandidRoot Solutions
CandidRoot Solutions Private Limited
 
How to get the licensing right for Microsoft Core Infrastructure Server Suite...
Q-Advise
 
Why Are More Businesses Choosing Partners Over Freelancers for Salesforce.pdf
Cymetrix Software
 
Top 10 AI Use Cases Every Business Should Know.pdf
nicogonzalez1075
 
Enhancing Security in VAST: Towards Static Vulnerability Scanning
ESUG
 
Operations Profile SPDX_Update_20250711_Example_05_03.pptx
Shane Coughlan
 
Chess King 25.0.0.2500 With Crack Full Free Download
cracked shares
 
API DOCUMENTATION | API INTEGRATION PLATFORM
philipnathen82
 
Ready Layer One: Intro to the Model Context Protocol
mmckenna1
 
Notification System for Construction Logistics Application
Safe Software
 
custom development enhancement | Togglenow.pdf
aswinisuhu
 
Optimizing Tiered Storage for Low-Latency Real-Time Analytics at AI Scale
Alluxio, Inc.
 
Understanding the EU Cyber Resilience Act
ICS
 
Ad

Coded ui - lesson 1 - overview

  • 1. Automatic Testing using the Coded UI Framework Lesson 1 - Overview Omer Karpas
  • 2. Abbreviations and Professional Terms (Glossary) Abbreviation or term Definition KDT Keywords Driven Testing AUT Application Under Test VS Visual Studio BB Building Block GUI Graphical User Interface VB Visual Basic CUIT Coded UI Test TC Test Case Scenario Synonym for Test Case
  • 3. Keyword Driven Testing  In KDT (keyword-driven testing), each keyword corresponds to an individual testing Action or Verification.  Examples:  A mouse click  Selection of a menu item  Keystrokes  Opening or closing a window  Verifying a control is visible  Verifying a control is enabled  Etc…
  • 4. Keyword Driven Testing  A keyword-driven test is a sequence of keywords, that simulate user actions on the AUT (Application Under Test).  Basically, to create a test, testers simply order the corresponding keywords of the desired Actions and Verifications.  Keywords are commonly called Modules or BB (Building Blocks).
  • 5. Keyword Driven Testing  Pros:  Reuse of code  Allows non-coding personals to build scenarios from the BB.  Much easier maintenance  Cons:  Takes more coding time  Conclusion – KDT is the way to go!
  • 6. Microsoft Coded UI Framework  create automated tests of the user interface (UI). These tests provide functional testing of the user interface. Automated UI tests enable you to test that the user interface is functioning correctly.
  • 7. Microsoft Coded UI Framework  Coded UI is a Framework designed to provide developers a way to:  Interact with the AUT (application under test) Controls, to get their state, values etc..  Interact with the AUT Controls, to Set their state, values etc..  Run their automatic TC (Test Cases).
  • 8. Microsoft Coded UI Framework  Coded UI Framework can handle Controls of the following types:  WinForms  HTML  WPF (Windows Presentation Foundation)  This is a big advantage of Coded UI because currently the only other tool that handles Custom controls of WPF is QTP.
  • 9. Microsoft Coded UI Framework  Coded UI tests can be written in VB.NET (Visual Basic) or in C# (C-Sharp).  Coded UI tests can be run separately or as an automated package.  Coded UI tests can be coded manually or by recording Tests using the Coded UI Test Builder.
  • 10. Microsoft Coded UI Framework  Using the KDT approach is up to the developer.  Coded UI framework have very limited special features to support coding with KDT in mind, but it is still highly recommended.
  • 11. Recording VS Manually Automating  In general, there are two ways to create Automatic tests with the Coded UI framework.  By using the “Coded UI Test Builder”  Recording your actions on the AUT and adding assertions(Verifications) – all without any coding involved.  Currently, the framework is not sufficient in recognizing custom controls, and mapping large scale applications.
  • 12. Recording VS Manually Automating  this way is not compatible with KDT approach, since we will need to record each scenario from start to end (no reuse of code).  For example, if we need to add another step to some of our CUITs (Coded UI Tests), we will need to record those tests again, from scratch, or we will need to manually code those actions and copy past the code across all tests,  Instead, by using KDT, we would just update one of our Modules.
  • 13. Recording VS Manually Automating  Writing code using coding capabilities – and this is what we will learn in this course.
  • 14. What you need (Prerequisites)  Visual Studio 2010 Ultimate or Visual Studio 2010 Premium or newer versions of Visual Studio.  SQL express (can be installed as part of the VS2010 installations).
  • 15. Creating a new Coded UI Project  Open Microsoft Visual Studio 2010 Ultimate (or newer)  Start a new testing project: “File” -> “New Project…” .  In the New Project window, select “Visual C#”-> “Test”, enter a name for the Project and press the OK button to create the test project.
  • 16. Creating a new Coded UI Project
  • 17. Creating a new Coded UI Project  Close the “UnitTest.cs” window  Right click on the “UnitTest.cs” in the “Solution Explorer” and select Delete.
  • 18. Project Entities  There are 3 types of entities to our project :  Control Mapping.  Implementation.  Modules.
  • 19. Control Mapping  The control mapping file contains all the AUD controls.  Most of the controls are mapped in the controls file, but not all, because some can only be detected in run time.
  • 20. Control Mapping  Each class in the file is a single control mapping, or else, when using it, we will get an exception (error).  The file is like a family graph where each control has its direct childes mapped in its class.  All controls are children’s of the main program window class.
  • 21. Implementation  The implementation file contains a single static class that contains all the methods (Actions and Verifications) that we want to run on the AUT.  Examples:  Open application.  Click abc button.  Set xyz textbox to “123”.
  • 22. Modules  Each Module file is a “CodedUITest” class.  Each Module contains a call to one method from the Implementation File.  Modules are the Automatic TC building blocks.
  • 23. Modules  Examples:  Open application.  Click abc button.  Set xyz textbox to ValueFromUser.
  • 24. Test Case (Scenario)  The Test Case file contains calls to Modules in a specific flow to verify the requested functionality.  Example:  Open the application.  Click abc button.  Verify Label text is “123”.
  • 25. Recommended reading  Addison Wesley, “Software Testing with Visual Studio 2010”.  http://blogs.msdn.com/b/mathew_aniyan/archive/201 3/02/18/content-index-for-coded-ui-test.aspx  ‫ועוד‬ ‫אתרים‬ ‫וידיאו‬ ‫ספרים‬..
  • 27. exercises  Create a new Coded UI Project.  Define the following abbreviations:  KDT-  AUT-  VS-  BB-  GUI-  VB-  CUIT-  TC-
  • 28. exercises  Write the 4 types of areas of the automation project, and explain each one of them in your own words.