SlideShare a Scribd company logo
Automatic Testing using the Coded UI Framework
Lesson 3 – Example - Calculator
Omer Karpas
1
Creating a Coded UI test
 Create a Coded UI Test:
 From the Solution Explorer: Right click on a folder or on
the project file -> Add -> Coded UI Test…
2
Creating a Coded UI test
 Select “Record action, edit UI map or add assertions”
and press OK, to use the “Coded UI Test builder” to
record the actions and add assertions.
3
Using the Coded UI Test Builder
 Press the record button. Each action we will do will be
recorded by the Coded UI Test Builder.
4
Recording the actions on the AUT
 Open Windows Calculator. By entering “calc” in the
search box of the Start menu.
5
Recording the actions on the AUD
 Each action we make is noted by the recorder.
6
Recording the actions on the AUT
 The selected application is marked with a special icon,
to show that this application actions are now being
recorded.
7
Recording the actions on the AUT
 Record a simple calculation: 2 + 3 =
 Press “Pause”.
 Press “Show Recorded Steps”.
8
Recording the actions on the AUT
 We can see all the actions we made.
 We can select any action, or several actions and delete
them using Right click or Del key.
9
Recording the actions on the AUT
 Press the “Generate Code” button.
 We can now enter a name for this scenario (Method).
And press “Add and Generate”.
 Close the Coded UI Test Builder.
10
Running the Coded UI Test
 Open the “Test View”: Test -> Windows -> Test View.
11
Running the Coded UI Test
 We can see all the Test Methods in the project.
 Select the Coded UI Test we recorded
and press on the Run button.
 Test Passed, Nice .
12
Adding assertions
 Now we should add assertions in order to compare the
expected result with the actual result.
 Scenario with no assertions is not a test.
 Select the Test, Right click in it and Select “Generate code
for Coded UI Test” -> “Use Coded UI Test Builder”.
13
Adding assertions
 Lets drag the crosshair icon on top of the result label
of the calculator.
14
Adding assertions
 We see all the Properties the controls have that are
visible to us.
 Select the “DisplayText”
Parameter and press on the
“Add Assertion”.
15
Adding assertions
 Select “AreEqual” from the listBox and leave the value
as is. Press OK.
 Close the assertions window.
 Press on “Generate Code”, add a Method name And
press “Add and Generate”.
 Close the CUIT Builder.
16
Running the Coded UI Test
 Run again the Coded UI Test we recorded.
 Test Passed, Nice .
 But we didn’t see any difference – we will
see more later.
17
The generated code
 2 new lines were added to our Test Method:
 Those 2 lines are the names we gave the 2 methods we
generated via the CUIT Builder.
18
The generated code
 Lets go over the “SimpleCalculation” Method.
19
The generated code
 Here are defined the controls we use in the Method:
 Number two button (2).
 Add button (+)
 Number three button (3).
 Result button (=)
 We can see that the names are not very good.
20
The generated code
 Here we can see that we define the AUT and open it.
 Then we click the buttons.
21
The generated code
 Lets go over the “VerifyResault” Method:
 One Control is defined – the Result control.
 Then we Verify its “DisplayText” Property is equal to 5.
22
To be continued..
 We will go over the generated code in more details and
depth in the next lessons..
23

More Related Content

What's hot

Coded ui in a nutshell
Coded ui in a nutshellCoded ui in a nutshell
Coded ui in a nutshellOmer Karpas
 
Coded UI - Test automation Practices from the Field
Coded UI - Test automation Practices from the FieldCoded UI - Test automation Practices from the Field
Coded UI - Test automation Practices from the Field
Clemens Reijnen
 
Advanced Coded UI Testing
Advanced Coded UI TestingAdvanced Coded UI Testing
Advanced Coded UI Testing
Shai Raiten
 
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
 
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
 
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
 
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
 
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
 
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
 
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
 
Test Complete
Test CompleteTest Complete
Test Complete
RomSoft SRL
 
Steps how to create active x using visual studio 2008
Steps how to create active x using visual studio 2008Steps how to create active x using visual studio 2008
Steps how to create active x using visual studio 2008
Yudep Apoi
 
Case study on testing
Case study on testingCase study on testing
Case study on testingShivani Joshi
 
Testing tools in visual studio
Testing tools in visual studioTesting tools in visual studio
Testing tools in visual studio
Mahdi Esmailoghli
 
Lab Management with TFS 2010
Lab Management with TFS 2010Lab Management with TFS 2010
Lab Management with TFS 2010
Ed Blankenship
 
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
 

What's hot (20)

Coded ui in a nutshell
Coded ui in a nutshellCoded ui in a nutshell
Coded ui in a nutshell
 
Coded UI - Test automation Practices from the Field
Coded UI - Test automation Practices from the FieldCoded UI - Test automation Practices from the Field
Coded UI - Test automation Practices from the Field
 
Advanced Coded UI Testing
Advanced Coded UI TestingAdvanced Coded UI Testing
Advanced Coded UI Testing
 
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
 
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 ...
 
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
 
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)
 
Coded ui - lesson 5 - ui map
Coded ui - lesson 5 - ui mapCoded ui - lesson 5 - ui map
Coded ui - lesson 5 - ui map
 
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
 
Technical meeting automated testing with vs2010
Technical meeting automated testing with vs2010Technical meeting automated testing with vs2010
Technical meeting automated testing with vs2010
 
Test Complete
Test CompleteTest Complete
Test Complete
 
Steps how to create active x using visual studio 2008
Steps how to create active x using visual studio 2008Steps how to create active x using visual studio 2008
Steps how to create active x using visual studio 2008
 
Case study on testing
Case study on testingCase study on testing
Case study on testing
 
Testing tools in visual studio
Testing tools in visual studioTesting tools in visual studio
Testing tools in visual studio
 
Lab Management with TFS 2010
Lab Management with TFS 2010Lab Management with TFS 2010
Lab Management with TFS 2010
 
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
 
Android course (lecture2)
Android course (lecture2)Android course (lecture2)
Android course (lecture2)
 

Viewers also liked

Maximizing UI Automation – A Case Study
Maximizing UI Automation – A Case StudyMaximizing UI Automation – A Case Study
Maximizing UI Automation – A Case Study
Noam Kfir
 
Voip automation framework
Voip automation frameworkVoip automation framework
Voip automation framework
Happiest Minds Technologies
 
Software-automation-testing-course-navi-mumbai-software-automation-testing-co...
Software-automation-testing-course-navi-mumbai-software-automation-testing-co...Software-automation-testing-course-navi-mumbai-software-automation-testing-co...
Software-automation-testing-course-navi-mumbai-software-automation-testing-co...
VibrantGroup
 
Automation in software engineering
Automation in software engineeringAutomation in software engineering
Automation in software engineering
Mphasis
 
Michael Snyman - Software Test Automation Success
Michael Snyman - Software Test Automation Success Michael Snyman - Software Test Automation Success
Michael Snyman - Software Test Automation Success
TEST Huddle
 
Case Study : Manual & Automation Testing
Case Study : Manual & Automation TestingCase Study : Manual & Automation Testing
Case Study : Manual & Automation Testing
360logica Software Testing Services (A Saksoft Company)
 
Testers and Coders - Blurring the Lines
Testers and Coders - Blurring the LinesTesters and Coders - Blurring the Lines
Testers and Coders - Blurring the Lines
Noam Kfir
 
Why Test Automation Fails
Why Test Automation FailsWhy Test Automation Fails
Why Test Automation Fails
Ranorex
 
Test automation - Building effective solutions
Test automation - Building effective solutionsTest automation - Building effective solutions
Test automation - Building effective solutions
Artem Nagornyi
 
automation testing benefits
automation testing benefitsautomation testing benefits
automation testing benefitsnazeer pasha
 
10 Benefits of Automated Testing
10 Benefits of Automated Testing10 Benefits of Automated Testing
10 Benefits of Automated Testing
TestObject - Mobile Testing
 
TEST_AUTOMATION_CASE_STUDY_(2)2[1]
TEST_AUTOMATION_CASE_STUDY_(2)2[1]TEST_AUTOMATION_CASE_STUDY_(2)2[1]
TEST_AUTOMATION_CASE_STUDY_(2)2[1]Clive Dall
 
Automation testing strategy, approach & planning
Automation testing  strategy, approach & planningAutomation testing  strategy, approach & planning
Automation testing strategy, approach & planningSivaprasanthRentala1975
 

Viewers also liked (13)

Maximizing UI Automation – A Case Study
Maximizing UI Automation – A Case StudyMaximizing UI Automation – A Case Study
Maximizing UI Automation – A Case Study
 
Voip automation framework
Voip automation frameworkVoip automation framework
Voip automation framework
 
Software-automation-testing-course-navi-mumbai-software-automation-testing-co...
Software-automation-testing-course-navi-mumbai-software-automation-testing-co...Software-automation-testing-course-navi-mumbai-software-automation-testing-co...
Software-automation-testing-course-navi-mumbai-software-automation-testing-co...
 
Automation in software engineering
Automation in software engineeringAutomation in software engineering
Automation in software engineering
 
Michael Snyman - Software Test Automation Success
Michael Snyman - Software Test Automation Success Michael Snyman - Software Test Automation Success
Michael Snyman - Software Test Automation Success
 
Case Study : Manual & Automation Testing
Case Study : Manual & Automation TestingCase Study : Manual & Automation Testing
Case Study : Manual & Automation Testing
 
Testers and Coders - Blurring the Lines
Testers and Coders - Blurring the LinesTesters and Coders - Blurring the Lines
Testers and Coders - Blurring the Lines
 
Why Test Automation Fails
Why Test Automation FailsWhy Test Automation Fails
Why Test Automation Fails
 
Test automation - Building effective solutions
Test automation - Building effective solutionsTest automation - Building effective solutions
Test automation - Building effective solutions
 
automation testing benefits
automation testing benefitsautomation testing benefits
automation testing benefits
 
10 Benefits of Automated Testing
10 Benefits of Automated Testing10 Benefits of Automated Testing
10 Benefits of Automated Testing
 
TEST_AUTOMATION_CASE_STUDY_(2)2[1]
TEST_AUTOMATION_CASE_STUDY_(2)2[1]TEST_AUTOMATION_CASE_STUDY_(2)2[1]
TEST_AUTOMATION_CASE_STUDY_(2)2[1]
 
Automation testing strategy, approach & planning
Automation testing  strategy, approach & planningAutomation testing  strategy, approach & planning
Automation testing strategy, approach & planning
 

Similar to Coded ui - lesson 3 - case study - calculator

CIS 170 Effective Communication - tutorialrank.com
CIS 170 Effective Communication - tutorialrank.comCIS 170 Effective Communication - tutorialrank.com
CIS 170 Effective Communication - tutorialrank.com
Bartholomew19
 
CIS 170 Inspiring Innovation/tutorialrank.com
 CIS 170 Inspiring Innovation/tutorialrank.com CIS 170 Inspiring Innovation/tutorialrank.com
CIS 170 Inspiring Innovation/tutorialrank.com
jonhson110
 
CIS 170 Become Exceptional--cis170.com
CIS 170 Become Exceptional--cis170.comCIS 170 Become Exceptional--cis170.com
CIS 170 Become Exceptional--cis170.com
claric131
 
Software engineering modeling lab lectures
Software engineering modeling lab lecturesSoftware engineering modeling lab lectures
Software engineering modeling lab lectures
marwaeng
 
A web source Project.pdf
A web source Project.pdfA web source Project.pdf
A web source Project.pdf
GeorgianaAlinaPatric
 
CIS 170 Achievement Education--cis170.com
CIS 170 Achievement Education--cis170.comCIS 170 Achievement Education--cis170.com
CIS 170 Achievement Education--cis170.com
agathachristie170
 
Web services in asp.net
Web services in asp.netWeb services in asp.net
Web services in asp.net
Dharma Raju
 
CIS 170 Inspiring Innovation -- cis170.com
CIS 170 Inspiring Innovation -- cis170.comCIS 170 Inspiring Innovation -- cis170.com
CIS 170 Inspiring Innovation -- cis170.com
kopiko104
 
CIS 170 Education for Service--cis170.com
CIS 170 Education for Service--cis170.comCIS 170 Education for Service--cis170.com
CIS 170 Education for Service--cis170.com
williamwordsworth11
 
CIS 170 Redefined Education--cis170.com
CIS 170 Redefined Education--cis170.comCIS 170 Redefined Education--cis170.com
CIS 170 Redefined Education--cis170.com
agathachristie208
 
Build your first rpa bot using IBM RPA automation
Build your first rpa bot using IBM RPA automationBuild your first rpa bot using IBM RPA automation
Build your first rpa bot using IBM RPA automation
Winton Winton
 
CIS 170 Education Specialist / snaptutorial.com
CIS 170  Education Specialist / snaptutorial.comCIS 170  Education Specialist / snaptutorial.com
CIS 170 Education Specialist / snaptutorial.com
McdonaldRyan138
 
Cis 170 c Enhance teaching / snaptutorial.com
Cis 170 c  Enhance teaching / snaptutorial.comCis 170 c  Enhance teaching / snaptutorial.com
Cis 170 c Enhance teaching / snaptutorial.com
HarrisGeorg51
 
Cis 170 Education Organization -- snaptutorial.com
Cis 170   Education Organization -- snaptutorial.comCis 170   Education Organization -- snaptutorial.com
Cis 170 Education Organization -- snaptutorial.com
DavisMurphyB99
 
CIS 170 Exceptional Education - snaptutorial.com
CIS 170   Exceptional Education - snaptutorial.comCIS 170   Exceptional Education - snaptutorial.com
CIS 170 Exceptional Education - snaptutorial.com
DavisMurphyB33
 
Cis 170 Education Organization / snaptutorial.com
Cis 170 Education Organization / snaptutorial.comCis 170 Education Organization / snaptutorial.com
Cis 170 Education Organization / snaptutorial.com
Baileya126
 
Devry cis 170 c i lab 1 of 7 getting started
Devry cis 170 c i lab 1 of 7 getting startedDevry cis 170 c i lab 1 of 7 getting started
Devry cis 170 c i lab 1 of 7 getting started
shyaminfo04
 
Devry cis 170 c i lab 1 of 7 getting started
Devry cis 170 c i lab 1 of 7 getting startedDevry cis 170 c i lab 1 of 7 getting started
Devry cis 170 c i lab 1 of 7 getting started
ash52393
 
CIS 170 Life of the Mind/newtonhelp.com   
CIS 170 Life of the Mind/newtonhelp.com   CIS 170 Life of the Mind/newtonhelp.com   
CIS 170 Life of the Mind/newtonhelp.com   
llflowe
 

Similar to Coded ui - lesson 3 - case study - calculator (20)

Introduction
IntroductionIntroduction
Introduction
 
CIS 170 Effective Communication - tutorialrank.com
CIS 170 Effective Communication - tutorialrank.comCIS 170 Effective Communication - tutorialrank.com
CIS 170 Effective Communication - tutorialrank.com
 
CIS 170 Inspiring Innovation/tutorialrank.com
 CIS 170 Inspiring Innovation/tutorialrank.com CIS 170 Inspiring Innovation/tutorialrank.com
CIS 170 Inspiring Innovation/tutorialrank.com
 
CIS 170 Become Exceptional--cis170.com
CIS 170 Become Exceptional--cis170.comCIS 170 Become Exceptional--cis170.com
CIS 170 Become Exceptional--cis170.com
 
Software engineering modeling lab lectures
Software engineering modeling lab lecturesSoftware engineering modeling lab lectures
Software engineering modeling lab lectures
 
A web source Project.pdf
A web source Project.pdfA web source Project.pdf
A web source Project.pdf
 
CIS 170 Achievement Education--cis170.com
CIS 170 Achievement Education--cis170.comCIS 170 Achievement Education--cis170.com
CIS 170 Achievement Education--cis170.com
 
Web services in asp.net
Web services in asp.netWeb services in asp.net
Web services in asp.net
 
CIS 170 Inspiring Innovation -- cis170.com
CIS 170 Inspiring Innovation -- cis170.comCIS 170 Inspiring Innovation -- cis170.com
CIS 170 Inspiring Innovation -- cis170.com
 
CIS 170 Education for Service--cis170.com
CIS 170 Education for Service--cis170.comCIS 170 Education for Service--cis170.com
CIS 170 Education for Service--cis170.com
 
CIS 170 Redefined Education--cis170.com
CIS 170 Redefined Education--cis170.comCIS 170 Redefined Education--cis170.com
CIS 170 Redefined Education--cis170.com
 
Build your first rpa bot using IBM RPA automation
Build your first rpa bot using IBM RPA automationBuild your first rpa bot using IBM RPA automation
Build your first rpa bot using IBM RPA automation
 
CIS 170 Education Specialist / snaptutorial.com
CIS 170  Education Specialist / snaptutorial.comCIS 170  Education Specialist / snaptutorial.com
CIS 170 Education Specialist / snaptutorial.com
 
Cis 170 c Enhance teaching / snaptutorial.com
Cis 170 c  Enhance teaching / snaptutorial.comCis 170 c  Enhance teaching / snaptutorial.com
Cis 170 c Enhance teaching / snaptutorial.com
 
Cis 170 Education Organization -- snaptutorial.com
Cis 170   Education Organization -- snaptutorial.comCis 170   Education Organization -- snaptutorial.com
Cis 170 Education Organization -- snaptutorial.com
 
CIS 170 Exceptional Education - snaptutorial.com
CIS 170   Exceptional Education - snaptutorial.comCIS 170   Exceptional Education - snaptutorial.com
CIS 170 Exceptional Education - snaptutorial.com
 
Cis 170 Education Organization / snaptutorial.com
Cis 170 Education Organization / snaptutorial.comCis 170 Education Organization / snaptutorial.com
Cis 170 Education Organization / snaptutorial.com
 
Devry cis 170 c i lab 1 of 7 getting started
Devry cis 170 c i lab 1 of 7 getting startedDevry cis 170 c i lab 1 of 7 getting started
Devry cis 170 c i lab 1 of 7 getting started
 
Devry cis 170 c i lab 1 of 7 getting started
Devry cis 170 c i lab 1 of 7 getting startedDevry cis 170 c i lab 1 of 7 getting started
Devry cis 170 c i lab 1 of 7 getting started
 
CIS 170 Life of the Mind/newtonhelp.com   
CIS 170 Life of the Mind/newtonhelp.com   CIS 170 Life of the Mind/newtonhelp.com   
CIS 170 Life of the Mind/newtonhelp.com   
 

Recently uploaded

AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
Google
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Globus
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
AMB-Review
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
Globus
 
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
 
Introduction to Pygame (Lecture 7 Python Game Development)
Introduction to Pygame (Lecture 7 Python Game Development)Introduction to Pygame (Lecture 7 Python Game Development)
Introduction to Pygame (Lecture 7 Python Game Development)
abdulrafaychaudhry
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus
 
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
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
Cyanic lab
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
Globus
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
Ortus Solutions, Corp
 
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
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
Matt Welsh
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Globus
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
XfilesPro
 
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
abdulrafaychaudhry
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
Globus
 
Top 7 Unique WhatsApp API Benefits | Saudi Arabia
Top 7 Unique WhatsApp API Benefits | Saudi ArabiaTop 7 Unique WhatsApp API Benefits | Saudi Arabia
Top 7 Unique WhatsApp API Benefits | Saudi Arabia
Yara Milbes
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
Fermin Galan
 

Recently uploaded (20)

AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
 
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
 
Introduction to Pygame (Lecture 7 Python Game Development)
Introduction to Pygame (Lecture 7 Python Game Development)Introduction to Pygame (Lecture 7 Python Game Development)
Introduction to Pygame (Lecture 7 Python Game Development)
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
 
Launch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in MinutesLaunch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in Minutes
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
 
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)
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
 
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
 
Top 7 Unique WhatsApp API Benefits | Saudi Arabia
Top 7 Unique WhatsApp API Benefits | Saudi ArabiaTop 7 Unique WhatsApp API Benefits | Saudi Arabia
Top 7 Unique WhatsApp API Benefits | Saudi Arabia
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
 

Coded ui - lesson 3 - case study - calculator

  • 1. Automatic Testing using the Coded UI Framework Lesson 3 – Example - Calculator Omer Karpas 1
  • 2. Creating a Coded UI test  Create a Coded UI Test:  From the Solution Explorer: Right click on a folder or on the project file -> Add -> Coded UI Test… 2
  • 3. Creating a Coded UI test  Select “Record action, edit UI map or add assertions” and press OK, to use the “Coded UI Test builder” to record the actions and add assertions. 3
  • 4. Using the Coded UI Test Builder  Press the record button. Each action we will do will be recorded by the Coded UI Test Builder. 4
  • 5. Recording the actions on the AUT  Open Windows Calculator. By entering “calc” in the search box of the Start menu. 5
  • 6. Recording the actions on the AUD  Each action we make is noted by the recorder. 6
  • 7. Recording the actions on the AUT  The selected application is marked with a special icon, to show that this application actions are now being recorded. 7
  • 8. Recording the actions on the AUT  Record a simple calculation: 2 + 3 =  Press “Pause”.  Press “Show Recorded Steps”. 8
  • 9. Recording the actions on the AUT  We can see all the actions we made.  We can select any action, or several actions and delete them using Right click or Del key. 9
  • 10. Recording the actions on the AUT  Press the “Generate Code” button.  We can now enter a name for this scenario (Method). And press “Add and Generate”.  Close the Coded UI Test Builder. 10
  • 11. Running the Coded UI Test  Open the “Test View”: Test -> Windows -> Test View. 11
  • 12. Running the Coded UI Test  We can see all the Test Methods in the project.  Select the Coded UI Test we recorded and press on the Run button.  Test Passed, Nice . 12
  • 13. Adding assertions  Now we should add assertions in order to compare the expected result with the actual result.  Scenario with no assertions is not a test.  Select the Test, Right click in it and Select “Generate code for Coded UI Test” -> “Use Coded UI Test Builder”. 13
  • 14. Adding assertions  Lets drag the crosshair icon on top of the result label of the calculator. 14
  • 15. Adding assertions  We see all the Properties the controls have that are visible to us.  Select the “DisplayText” Parameter and press on the “Add Assertion”. 15
  • 16. Adding assertions  Select “AreEqual” from the listBox and leave the value as is. Press OK.  Close the assertions window.  Press on “Generate Code”, add a Method name And press “Add and Generate”.  Close the CUIT Builder. 16
  • 17. Running the Coded UI Test  Run again the Coded UI Test we recorded.  Test Passed, Nice .  But we didn’t see any difference – we will see more later. 17
  • 18. The generated code  2 new lines were added to our Test Method:  Those 2 lines are the names we gave the 2 methods we generated via the CUIT Builder. 18
  • 19. The generated code  Lets go over the “SimpleCalculation” Method. 19
  • 20. The generated code  Here are defined the controls we use in the Method:  Number two button (2).  Add button (+)  Number three button (3).  Result button (=)  We can see that the names are not very good. 20
  • 21. The generated code  Here we can see that we define the AUT and open it.  Then we click the buttons. 21
  • 22. The generated code  Lets go over the “VerifyResault” Method:  One Control is defined – the Result control.  Then we Verify its “DisplayText” Property is equal to 5. 22
  • 23. To be continued..  We will go over the generated code in more details and depth in the next lessons.. 23