SlideShare a Scribd company logo
Automatic Testing using the Coded UI Framework
Lesson 6 – Manual Coding
Omer Karpas
Project Entities
 There are 3 types of entities to our project :
 Control Mapping.
 Implementation.
 Scenarios.
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”.
Scenarios (Test Cases)
 The Test Case file contains calls to methods from the
Implementation file, in a specific order to verify the
requested functionality.
 Example:
 Open the application.
 Click abc button.
 Verify Label text is “123”.
Creating the Project structure
 Right click on the Project and select “Add” -> “New
Folder”, and create 3 folders and change their names.
Creating the Project structure
 Right click on the Implementation folder and select
“Add” -> “Class…”, set a name for it and press “Add”.
Creating the Project structure
 Right click on the Controls folder and select “Add” ->
“Class…”, set a name for it and press “Add”.
Creating the Project structure
 Add the following lines to both class files at the top of them – in the Using
area:
 using System;
 using System.Collections.Generic;
 using System.Drawing;
 using System.Text.RegularExpressions;
 using System.Windows.Input;
 using System.Diagnostics;
 using Microsoft.VisualStudio.TestTools.UITest.Extension;
 using Microsoft.VisualStudio.TestTools.UITesting;
 using Microsoft.VisualStudio.TestTools.UITesting.WinControls;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
 using Microsoft.VisualStudio.TestTools.UITesting.WpfControls;
 using Keyboard = Microsoft.VisualStudio.TestTools.UITesting.Keyboard;
 using Mouse = Microsoft.VisualStudio.TestTools.UITesting.Mouse;
Creating the Project structure
 Add the following lines to the Implementation class:
 public Impelmentation()
 {
 }
 ApplicationUnderTest app = ApplicationUnderTest.Launch(@"C:Program Files
(x86)HBS26HBS.exe");
 Those lines are a default constructor and object of the
ApplicationUnderTest class that lunches the exact shown
path.
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

Coded ui - lesson 3 - case study - calculator
Coded ui - lesson 3 - case study - calculatorCoded ui - lesson 3 - case study - calculator
Coded ui - lesson 3 - case study - calculator
Omer Karpas
 
Unit testing with visual studio 2012
Unit testing with visual studio 2012Unit testing with visual studio 2012
Unit testing with visual studio 2012Abhimanyu Singhal
 
Coded ui in a nutshell
Coded ui in a nutshellCoded ui in a nutshell
Coded ui in a nutshellOmer Karpas
 
Coded ui - lesson 5 - ui map
Coded ui - lesson 5 - ui mapCoded ui - lesson 5 - ui map
Coded ui - lesson 5 - ui map
Omer Karpas
 
UI testing frameworks and the Coded UI testing paradigm
UI testing frameworks and the Coded UI testing paradigm UI testing frameworks and the Coded UI testing paradigm
UI testing frameworks and the Coded UI testing paradigm
Arnold Stellio
 
Testing the User Interface - Coded UI Tests with Visual Studio 2010
Testing the User Interface - Coded UI Tests with Visual Studio 2010Testing the User Interface - Coded UI Tests with Visual Studio 2010
Testing the User Interface - Coded UI Tests with Visual Studio 2010
Eric D. Boyd
 
Deep Dive Modern Apps Lifecycle with Visual Studio 2012: How to create cross ...
Deep Dive Modern Apps Lifecycle with Visual Studio 2012: How to create cross ...Deep Dive Modern Apps Lifecycle with Visual Studio 2012: How to create cross ...
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)
Remote Test Execution using TFS 2015 (RC2 and beyond)Remote Test Execution using TFS 2015 (RC2 and beyond)
Remote Test Execution using TFS 2015 (RC2 and beyond)
Allen Mathias
 
Test Tooling in Visual Studio 2012 an overview
Test Tooling in Visual Studio 2012 an overviewTest Tooling in Visual Studio 2012 an overview
Test Tooling in Visual Studio 2012 an overview
Clemens Reijnen
 
Technical meeting automated testing with vs2010
Technical meeting automated testing with vs2010Technical meeting automated testing with vs2010
Technical meeting automated testing with vs2010
Clemens Reijnen
 
Testing with test_complete
Testing with test_completeTesting with test_complete
Testing with test_completebinuiweb
 
Automation Testing with TestComplete
Automation Testing with TestCompleteAutomation Testing with TestComplete
Automation Testing with TestComplete
RomSoft SRL
 
MTM Test Management System
MTM Test Management SystemMTM Test Management System
MTM Test Management SystemMinu Mishra
 
Test Complete
Test CompleteTest Complete
Test Complete
RomSoft SRL
 
TestComplete – A Sophisticated Automated Testing Tool by SmartBear
TestComplete – A Sophisticated Automated Testing Tool by SmartBearTestComplete – A Sophisticated Automated Testing Tool by SmartBear
TestComplete – A Sophisticated Automated Testing Tool by SmartBear
Software Testing Solution
 
Getting started with test complete 7
Getting started with test complete 7Getting started with test complete 7
Getting started with test complete 7
Hoamuoigio Hoa
 
QA with Microsoft Test Manager and Lab Management
QA with Microsoft Test Manager and Lab ManagementQA with Microsoft Test Manager and Lab Management
QA with Microsoft Test Manager and Lab Management
Rofiqi Setiawan
 
Testing tools in visual studio
Testing tools in visual studioTesting tools in visual studio
Testing tools in visual studio
Mahdi Esmailoghli
 

What's hot (20)

Coded ui - lesson 3 - case study - calculator
Coded ui - lesson 3 - case study - calculatorCoded ui - lesson 3 - case study - calculator
Coded ui - lesson 3 - case study - calculator
 
Unit testing with visual studio 2012
Unit testing with visual studio 2012Unit testing with visual studio 2012
Unit testing with visual studio 2012
 
Coded ui in a nutshell
Coded ui in a nutshellCoded ui in a nutshell
Coded ui in a nutshell
 
Coded ui - lesson 5 - ui map
Coded ui - lesson 5 - ui mapCoded ui - lesson 5 - ui map
Coded ui - lesson 5 - ui map
 
UI testing frameworks and the Coded UI testing paradigm
UI testing frameworks and the Coded UI testing paradigm UI testing frameworks and the Coded UI testing paradigm
UI testing frameworks and the Coded UI testing paradigm
 
Testing the User Interface - Coded UI Tests with Visual Studio 2010
Testing the User Interface - Coded UI Tests with Visual Studio 2010Testing the User Interface - Coded UI Tests with Visual Studio 2010
Testing the User Interface - Coded UI Tests with Visual Studio 2010
 
Deep Dive Modern Apps Lifecycle with Visual Studio 2012: How to create cross ...
Deep Dive Modern Apps Lifecycle with Visual Studio 2012: How to create cross ...Deep Dive Modern Apps Lifecycle with Visual Studio 2012: How to create cross ...
Deep Dive Modern Apps Lifecycle with Visual Studio 2012: How to create cross ...
 
Remote Test Execution using TFS 2015 (RC2 and beyond)
Remote Test Execution using TFS 2015 (RC2 and beyond)Remote Test Execution using TFS 2015 (RC2 and beyond)
Remote Test Execution using TFS 2015 (RC2 and beyond)
 
Test Tooling in Visual Studio 2012 an overview
Test Tooling in Visual Studio 2012 an overviewTest Tooling in Visual Studio 2012 an overview
Test Tooling in Visual Studio 2012 an overview
 
Technical meeting automated testing with vs2010
Technical meeting automated testing with vs2010Technical meeting automated testing with vs2010
Technical meeting automated testing with vs2010
 
Testing with test_complete
Testing with test_completeTesting with test_complete
Testing with test_complete
 
Active x
Active xActive x
Active x
 
Automation Testing with TestComplete
Automation Testing with TestCompleteAutomation Testing with TestComplete
Automation Testing with TestComplete
 
MTM Test Management System
MTM Test Management SystemMTM Test Management System
MTM Test Management System
 
Test Complete
Test CompleteTest Complete
Test Complete
 
TestComplete – A Sophisticated Automated Testing Tool by SmartBear
TestComplete – A Sophisticated Automated Testing Tool by SmartBearTestComplete – A Sophisticated Automated Testing Tool by SmartBear
TestComplete – A Sophisticated Automated Testing Tool by SmartBear
 
Getting started with test complete 7
Getting started with test complete 7Getting started with test complete 7
Getting started with test complete 7
 
Testing_with_TestComplete
Testing_with_TestCompleteTesting_with_TestComplete
Testing_with_TestComplete
 
QA with Microsoft Test Manager and Lab Management
QA with Microsoft Test Manager and Lab ManagementQA with Microsoft Test Manager and Lab Management
QA with Microsoft Test Manager and Lab Management
 
Testing tools in visual studio
Testing tools in visual studioTesting tools in visual studio
Testing tools in visual studio
 

Similar to Coded ui - lesson 6 - manual coding

Qtp launch
Qtp launchQtp launch
Lab #1 Develop System Administration Procedures for Windows 8.1 Sec.docx
Lab #1 Develop System Administration Procedures for Windows 8.1 Sec.docxLab #1 Develop System Administration Procedures for Windows 8.1 Sec.docx
Lab #1 Develop System Administration Procedures for Windows 8.1 Sec.docx
sleeperfindley
 
Chapter 3 SOFTWARE TESTING PROCESS
Chapter 3 SOFTWARE TESTING PROCESSChapter 3 SOFTWARE TESTING PROCESS
Chapter 3 SOFTWARE TESTING PROCESS
st. michael
 
Components lab
Components labComponents lab
Components lab
IBM Rational software
 
Bt0081 software engineering2
Bt0081 software engineering2Bt0081 software engineering2
Bt0081 software engineering2
Techglyphs
 
Lesson 1 Basic Tutorial Data Analysis Software for Flow Cytometry
Lesson  1 Basic Tutorial Data Analysis Software for Flow CytometryLesson  1 Basic Tutorial Data Analysis Software for Flow Cytometry
Lesson 1 Basic Tutorial Data Analysis Software for Flow Cytometry
Uttam Belbase
 
Components lab
Components labComponents lab
Components lab
Joanne Scouler
 
Use case 1 User LoginActor Admin, Faculty, or StudentBa.docx
Use case 1 User LoginActor Admin, Faculty, or StudentBa.docxUse case 1 User LoginActor Admin, Faculty, or StudentBa.docx
Use case 1 User LoginActor Admin, Faculty, or StudentBa.docx
jessiehampson
 
Getting started with_testcomplete
Getting started with_testcompleteGetting started with_testcomplete
Getting started with_testcompleteankit.das
 
Ian Sommerville, Software Engineering, 9th EditionCh 8
Ian Sommerville,  Software Engineering, 9th EditionCh 8Ian Sommerville,  Software Engineering, 9th EditionCh 8
Ian Sommerville, Software Engineering, 9th EditionCh 8
Mohammed Romi
 
Tutorial 3 accessing the database
Tutorial 3 accessing the databaseTutorial 3 accessing the database
Tutorial 3 accessing the database
ssa_joe
 
Testing Options in Java
Testing Options in JavaTesting Options in Java
Testing Options in Java
Michael Fons
 
Automation Framework 042009 V2
Automation Framework   042009  V2Automation Framework   042009  V2
Automation Framework 042009 V2
Devukjs
 
SessionCreatorHelp
SessionCreatorHelpSessionCreatorHelp
SessionCreatorHelp
Sven Finsterwalder
 
Ch8
Ch8Ch8
Ch8
Ch8Ch8
Ch8-Software Engineering 9
Ch8-Software Engineering 9Ch8-Software Engineering 9
Ch8-Software Engineering 9Ian Sommerville
 
VB_ERROR CONTROL_FILE HANDLING.ppt
VB_ERROR CONTROL_FILE HANDLING.pptVB_ERROR CONTROL_FILE HANDLING.ppt
VB_ERROR CONTROL_FILE HANDLING.ppt
BhuvanaR13
 
Laporan Praktikum Keamanan Siber - Tugas 2 -Kelas C - Kelompok 3.pdf
Laporan Praktikum Keamanan Siber - Tugas 2 -Kelas C - Kelompok 3.pdfLaporan Praktikum Keamanan Siber - Tugas 2 -Kelas C - Kelompok 3.pdf
Laporan Praktikum Keamanan Siber - Tugas 2 -Kelas C - Kelompok 3.pdf
IGedeArieYogantaraSu
 

Similar to Coded ui - lesson 6 - manual coding (20)

Qtp launch
Qtp launchQtp launch
Qtp launch
 
Lab #1 Develop System Administration Procedures for Windows 8.1 Sec.docx
Lab #1 Develop System Administration Procedures for Windows 8.1 Sec.docxLab #1 Develop System Administration Procedures for Windows 8.1 Sec.docx
Lab #1 Develop System Administration Procedures for Windows 8.1 Sec.docx
 
Chapter 3 SOFTWARE TESTING PROCESS
Chapter 3 SOFTWARE TESTING PROCESSChapter 3 SOFTWARE TESTING PROCESS
Chapter 3 SOFTWARE TESTING PROCESS
 
Components lab
Components labComponents lab
Components lab
 
Bt0081 software engineering2
Bt0081 software engineering2Bt0081 software engineering2
Bt0081 software engineering2
 
Lesson 1 Basic Tutorial Data Analysis Software for Flow Cytometry
Lesson  1 Basic Tutorial Data Analysis Software for Flow CytometryLesson  1 Basic Tutorial Data Analysis Software for Flow Cytometry
Lesson 1 Basic Tutorial Data Analysis Software for Flow Cytometry
 
Components lab
Components labComponents lab
Components lab
 
Use case 1 User LoginActor Admin, Faculty, or StudentBa.docx
Use case 1 User LoginActor Admin, Faculty, or StudentBa.docxUse case 1 User LoginActor Admin, Faculty, or StudentBa.docx
Use case 1 User LoginActor Admin, Faculty, or StudentBa.docx
 
Getting started with_testcomplete
Getting started with_testcompleteGetting started with_testcomplete
Getting started with_testcomplete
 
Ian Sommerville, Software Engineering, 9th EditionCh 8
Ian Sommerville,  Software Engineering, 9th EditionCh 8Ian Sommerville,  Software Engineering, 9th EditionCh 8
Ian Sommerville, Software Engineering, 9th EditionCh 8
 
Tutorial 3 accessing the database
Tutorial 3 accessing the databaseTutorial 3 accessing the database
Tutorial 3 accessing the database
 
Testing Options in Java
Testing Options in JavaTesting Options in Java
Testing Options in Java
 
10team
10team10team
10team
 
Automation Framework 042009 V2
Automation Framework   042009  V2Automation Framework   042009  V2
Automation Framework 042009 V2
 
SessionCreatorHelp
SessionCreatorHelpSessionCreatorHelp
SessionCreatorHelp
 
Ch8
Ch8Ch8
Ch8
 
Ch8
Ch8Ch8
Ch8
 
Ch8-Software Engineering 9
Ch8-Software Engineering 9Ch8-Software Engineering 9
Ch8-Software Engineering 9
 
VB_ERROR CONTROL_FILE HANDLING.ppt
VB_ERROR CONTROL_FILE HANDLING.pptVB_ERROR CONTROL_FILE HANDLING.ppt
VB_ERROR CONTROL_FILE HANDLING.ppt
 
Laporan Praktikum Keamanan Siber - Tugas 2 -Kelas C - Kelompok 3.pdf
Laporan Praktikum Keamanan Siber - Tugas 2 -Kelas C - Kelompok 3.pdfLaporan Praktikum Keamanan Siber - Tugas 2 -Kelas C - Kelompok 3.pdf
Laporan Praktikum Keamanan Siber - Tugas 2 -Kelas C - Kelompok 3.pdf
 

Recently uploaded

Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
Rakesh Kumar R
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
Hornet Dynamics
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
Łukasz Chruściel
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
Shane Coughlan
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
Aftab Hussain
 
Launch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in MinutesLaunch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in Minutes
Roshan Dwivedi
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
Ayan Halder
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
TheSMSPoint
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
Deuglo Infosystem Pvt Ltd
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Mind IT Systems
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
timtebeek1
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
Boni García
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
Google
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
Drona Infotech
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Neo4j
 

Recently uploaded (20)

Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
 
Launch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in MinutesLaunch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in Minutes
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
 

Coded ui - lesson 6 - manual coding

  • 1. Automatic Testing using the Coded UI Framework Lesson 6 – Manual Coding Omer Karpas
  • 2. Project Entities  There are 3 types of entities to our project :  Control Mapping.  Implementation.  Scenarios.
  • 3. 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.
  • 4. 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.
  • 5. 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”.
  • 6. Scenarios (Test Cases)  The Test Case file contains calls to methods from the Implementation file, in a specific order to verify the requested functionality.  Example:  Open the application.  Click abc button.  Verify Label text is “123”.
  • 7. Creating the Project structure  Right click on the Project and select “Add” -> “New Folder”, and create 3 folders and change their names.
  • 8. Creating the Project structure  Right click on the Implementation folder and select “Add” -> “Class…”, set a name for it and press “Add”.
  • 9. Creating the Project structure  Right click on the Controls folder and select “Add” -> “Class…”, set a name for it and press “Add”.
  • 10. Creating the Project structure  Add the following lines to both class files at the top of them – in the Using area:  using System;  using System.Collections.Generic;  using System.Drawing;  using System.Text.RegularExpressions;  using System.Windows.Input;  using System.Diagnostics;  using Microsoft.VisualStudio.TestTools.UITest.Extension;  using Microsoft.VisualStudio.TestTools.UITesting;  using Microsoft.VisualStudio.TestTools.UITesting.WinControls;  using Microsoft.VisualStudio.TestTools.UnitTesting;  using Microsoft.VisualStudio.TestTools.UITesting.WpfControls;  using Keyboard = Microsoft.VisualStudio.TestTools.UITesting.Keyboard;  using Mouse = Microsoft.VisualStudio.TestTools.UITesting.Mouse;
  • 11. Creating the Project structure  Add the following lines to the Implementation class:  public Impelmentation()  {  }  ApplicationUnderTest app = ApplicationUnderTest.Launch(@"C:Program Files (x86)HBS26HBS.exe");  Those lines are a default constructor and object of the ApplicationUnderTest class that lunches the exact shown path.
  • 12.
  • 13. exercises  Create a new Coded UI Project.  Define the following abbreviations:  KDT-  AUT-  VS-  BB-  GUI-  VB-  CUIT-  TC-
  • 14. exercises  Write the 4 types of areas of the automation project, and explain each one of them in your own words.