SlideShare una empresa de Scribd logo
1 de 40
Overview of testing features of Visual studio Module 1 iMentor Knowledge Services
Testing Effort Requirements ,[object Object]
Comprehensive, Fast, Accurate, Consistent, Responsive to changes in development process
Tests Must Cover
User Interface, Business Logic, Database Components
Test Results
Captured in consistent mechanism, Traceable, Automated (for repetitive),[object Object]
Tester Segmentation Generalist Tester Specialist Tester Manual Testing Some Scripts Creates Batch Files to set up lab, create data Strong Scripting Skills Some Coding Skills Strong Coding Skills Develops fully automated testing procedures Expert coding skills Blank Box Testing White box testing API testing
Visual Studio 2010 Testing Stack
Microsoft Test Manager Test Planning Creating Test Plans Creating Test Suites Creating & Organizing Test Cases Test Execution (Manual & Scheduled) Running Manual Tests Fast Forward for Manual Tests Logging Rich Bugs
A Note on Developer Tester CollaborationAnd No Repro Bugs Developers are from Mars Testers are from Venus
Diagnostic Data Adapters Used to collect data or impact a test system Action Log and Action Recording ASP.NET Profiler Code Coverage Intellitrace Event Log System Information Test Impact Video Recorder Network Emuation Custom -> can be created
Test Controllers and Test Agents Run Tests Remotely on Multiple Machines Collect Data and Diagnostics Remotely
Visual Studio as Test Organizer All tests except Manual are stored as course code files Projects have hundreds/thousands test and keeps growing VS provides test project to create and store tests Test View Window allows test categories to group tests Test list allows Build Integration Test Results can be viewed, saved and published from Studio (TRX)
Demonstration Understanding Visual Studio Test Environment Organizing Visual Studio Test Environment Test Lists Window Tests View Test Results Window .vsdmi and .testsettings file Test Settings Window Test Properties
Automated Testing Support in Visual Studio  Use following windows to run and modify properties for automated test cases Test View Test List Some Important Test Properties Test Name Test Enabled (True/False) Test Type Priority Iteration Test Categories
Overview of Coded UI Test
Understanding Resilient Playback of Coded UI Tests
Platform Support for Coded UI Tests
Creating a coded ui test Module 2 iMentor Knowledge Services
Creation of Coded UI Tests ,[object Object]
Generating from an Existing Action Recording ( Converting from manual test recording)
Creating a New Coded-UI Test From Scratch
Writing Code From Scratch(Advanced Option ),[object Object]
To Create a Coded UI test Perform any one of the following tasks: In Solution Explorer, right-click a test project, point to Add, and then click Coded UI Test. In the Test List Editor or the Test View window, right-click the window, and then click New Test. In the Add New Test dialog box, click Coded UI Test and then click OK. On the Test menu, click New Test. In the Add New Test dialog box, click Coded UI Test and then click OK. The Generate Code dialog box appears. From this dialog box, you can select Record actions in your application under test, modify the UI map or add assertions Record your interaction and when done Hit Generate Code and close the recorder
The Coded UI Test Recorder Window Shows Currently Recorded Steps Starts Recording users interaction with Desktop Generates Code for Recorded Actions Allows you to select controls and add assertions
The Coded UI Test Recorder Window Allows you to pause and start recording Allows you to generate code methods for currently recorded Actions or UI Objects Shows a List of Currently Recorded Steps Allows you to select controls on the user interface and add them to UI Map and Add Assertions on there properties
Demonstration Creating Automated Test from manual test Creating Automated Test By Recording Exploring Generated Code
Creating Coded UI Test Tips Use the CrossHair to Locate Controls on User Interface Use Navigation button to move between parent and child controls and also peer controls You can pin the recorded steps window so that it is visible always You can delete recorded steps Make Recording Autonomous and Repeatable
Reach nested controls using Coded UI Test Builder
Generated Code Files
Generated Code - Classes
Coded UI Test Editor
Features of Coded UI Test Editor Use Coded UI Test Editor for To locate UI actions and controls. Remove unwanted UI actions. Changes the names for test methods and controls. View and Open Properties Window for selected item. Split one action into multiple methods. Adds custom code to your test methods by moving to UImap.cs Add a pause prior to a UI action specified in milliseconds. Identifies the location of the control in the UI of application under test. To verify control property and significant changes to the application’s controls.
Demonstration – Using Coded UI Test Editor
Adding More Actions to Coded-UI Test Position Cursor where you want the new Steps to be added in CodedUI Test Method Start Recording and Hit Generate Code Button when done.  New Actions are recorded as Methods and added where you had placed your cursor
Demonstration Adding more actions to an already recorded Coded-UI Test Method
Adding and using Assertions Module 3 iMentor Knowledge Services
What are assertions..? Methods that let you validate properties of your user interface elements. You typically compare the value of control properties with an expected value Expected value can be hard code or come from parameters or external files Assertions use the Unit Test assertion methods
Adding Assertions using Coded-UI Test Builder

Más contenido relacionado

La actualidad más candente

Coded ui - lesson 2 - coded ui test builder
Coded ui - lesson 2 - coded ui test builderCoded ui - lesson 2 - coded ui test builder
Coded ui - lesson 2 - coded ui test builderOmer Karpas
 
Coded ui in a nutshell
Coded ui in a nutshellCoded ui in a nutshell
Coded ui in a nutshellOmer Karpas
 
Coded ui - lesson 9 - test windows
Coded ui - lesson 9 - test windowsCoded ui - lesson 9 - test windows
Coded ui - lesson 9 - test windowsOmer 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 2010Eric 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
 
Testing with test_complete
Testing with test_completeTesting with test_complete
Testing with test_completebinuiweb
 
Technical meeting automated testing with vs2010
Technical meeting automated testing with vs2010Technical meeting automated testing with vs2010
Technical meeting automated testing with vs2010Clemens Reijnen
 
Automation Testing with TestComplete
Automation Testing with TestCompleteAutomation Testing with TestComplete
Automation Testing with TestCompleteRomSoft SRL
 
MTM Test Management System
MTM Test Management SystemMTM Test Management System
MTM Test Management SystemMinu Mishra
 
Testing tools in visual studio
Testing tools in visual studioTesting tools in visual studio
Testing tools in visual studioMahdi Esmailoghli
 
Lab Management with TFS 2010
Lab Management with TFS 2010Lab Management with TFS 2010
Lab Management with TFS 2010Ed Blankenship
 
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 ManagementRofiqi Setiawan
 
Automation Testing with Test Complete
Automation Testing with Test CompleteAutomation Testing with Test Complete
Automation Testing with Test CompleteVartika Saxena
 
Case study on testing
Case study on testingCase study on testing
Case study on testingShivani Joshi
 

La actualidad más candente (20)

Coded ui - lesson 2 - coded ui test builder
Coded ui - lesson 2 - coded ui test builderCoded ui - lesson 2 - coded ui test builder
Coded ui - lesson 2 - coded ui test builder
 
Coded ui in a nutshell
Coded ui in a nutshellCoded ui in a nutshell
Coded ui in a nutshell
 
Coded ui - lesson 9 - test windows
Coded ui - lesson 9 - test windowsCoded ui - lesson 9 - test windows
Coded ui - lesson 9 - test windows
 
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)
 
Testing with test_complete
Testing with test_completeTesting with test_complete
Testing with test_complete
 
Technical meeting automated testing with vs2010
Technical meeting automated testing with vs2010Technical meeting automated testing with vs2010
Technical meeting automated testing with vs2010
 
Automation Testing with TestComplete
Automation Testing with TestCompleteAutomation Testing with TestComplete
Automation Testing with TestComplete
 
Test Complete
Test CompleteTest Complete
Test Complete
 
MTM Test Management System
MTM Test Management SystemMTM Test Management System
MTM Test Management System
 
Test complete, work done so far
Test complete, work done so farTest complete, work done so far
Test complete, work done so far
 
Active x
Active xActive x
Active x
 
Testing_with_TestComplete
Testing_with_TestCompleteTesting_with_TestComplete
Testing_with_TestComplete
 
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
 
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
 
Automation Testing with Test Complete
Automation Testing with Test CompleteAutomation Testing with Test Complete
Automation Testing with Test Complete
 
Case study on testing
Case study on testingCase study on testing
Case study on testing
 

Destacado

UI Testing Automation
UI Testing AutomationUI Testing Automation
UI Testing AutomationAgileEngine
 
Coded ui - lesson 5 - ui map
Coded ui - lesson 5 - ui mapCoded ui - lesson 5 - ui map
Coded ui - lesson 5 - ui mapOmer Karpas
 
Hybrid Mobile Development
Hybrid Mobile DevelopmentHybrid Mobile Development
Hybrid Mobile DevelopmentShai Raiten
 
Unit testing in JavaScript with Jasmine and Karma
Unit testing in JavaScript with Jasmine and KarmaUnit testing in JavaScript with Jasmine and Karma
Unit testing in JavaScript with Jasmine and KarmaAndrey Kolodnitsky
 
Web UI test automation instruments
Web UI test automation instrumentsWeb UI test automation instruments
Web UI test automation instrumentsArtem Nagornyi
 
Angularjs - Unit testing introduction
Angularjs - Unit testing introductionAngularjs - Unit testing introduction
Angularjs - Unit testing introductionNir Kaufman
 
JavaScript TDD with Jasmine and Karma
JavaScript TDD with Jasmine and KarmaJavaScript TDD with Jasmine and Karma
JavaScript TDD with Jasmine and KarmaChristopher Bartling
 
BDD presentation
BDD presentationBDD presentation
BDD presentationtemebele
 
Test and Behaviour Driven Development (TDD/BDD)
Test and Behaviour Driven Development (TDD/BDD)Test and Behaviour Driven Development (TDD/BDD)
Test and Behaviour Driven Development (TDD/BDD)Lars Thorup
 
Unit Testing Concepts and Best Practices
Unit Testing Concepts and Best PracticesUnit Testing Concepts and Best Practices
Unit Testing Concepts and Best PracticesDerek Smith
 
Behavior Driven Development
Behavior Driven DevelopmentBehavior Driven Development
Behavior Driven DevelopmentLiz Keogh
 
Behavior Driven Development with Cucumber
Behavior Driven Development with CucumberBehavior Driven Development with Cucumber
Behavior Driven Development with CucumberBrandon Keepers
 
Web Service Presentation
Web Service PresentationWeb Service Presentation
Web Service Presentationguest0df6b0
 

Destacado (15)

UI Testing Automation
UI Testing AutomationUI Testing Automation
UI Testing Automation
 
Coded ui - lesson 5 - ui map
Coded ui - lesson 5 - ui mapCoded ui - lesson 5 - ui map
Coded ui - lesson 5 - ui map
 
Hybrid Mobile Development
Hybrid Mobile DevelopmentHybrid Mobile Development
Hybrid Mobile Development
 
Unit testing in JavaScript with Jasmine and Karma
Unit testing in JavaScript with Jasmine and KarmaUnit testing in JavaScript with Jasmine and Karma
Unit testing in JavaScript with Jasmine and Karma
 
Web UI test automation instruments
Web UI test automation instrumentsWeb UI test automation instruments
Web UI test automation instruments
 
Angularjs - Unit testing introduction
Angularjs - Unit testing introductionAngularjs - Unit testing introduction
Angularjs - Unit testing introduction
 
Karma - JS Test Runner
Karma - JS Test RunnerKarma - JS Test Runner
Karma - JS Test Runner
 
JavaScript TDD with Jasmine and Karma
JavaScript TDD with Jasmine and KarmaJavaScript TDD with Jasmine and Karma
JavaScript TDD with Jasmine and Karma
 
BDD presentation
BDD presentationBDD presentation
BDD presentation
 
C# basics
 C# basics C# basics
C# basics
 
Test and Behaviour Driven Development (TDD/BDD)
Test and Behaviour Driven Development (TDD/BDD)Test and Behaviour Driven Development (TDD/BDD)
Test and Behaviour Driven Development (TDD/BDD)
 
Unit Testing Concepts and Best Practices
Unit Testing Concepts and Best PracticesUnit Testing Concepts and Best Practices
Unit Testing Concepts and Best Practices
 
Behavior Driven Development
Behavior Driven DevelopmentBehavior Driven Development
Behavior Driven Development
 
Behavior Driven Development with Cucumber
Behavior Driven Development with CucumberBehavior Driven Development with Cucumber
Behavior Driven Development with Cucumber
 
Web Service Presentation
Web Service PresentationWeb Service Presentation
Web Service Presentation
 

Similar a Coded ui test

STARWEST 2010 - 7 Steps To Improving Software Quality using Microsoft Test Ma...
STARWEST 2010 - 7 Steps To Improving Software Quality using Microsoft Test Ma...STARWEST 2010 - 7 Steps To Improving Software Quality using Microsoft Test Ma...
STARWEST 2010 - 7 Steps To Improving Software Quality using Microsoft Test Ma...Anna Russo
 
STARWEST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...
STARWEST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...STARWEST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...
STARWEST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...Anna Russo
 
STAREAST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...
STAREAST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...STAREAST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...
STAREAST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...Anna Russo
 
Improving Software Quality- 2-day Tester Training
Improving Software Quality- 2-day Tester TrainingImproving Software Quality- 2-day Tester Training
Improving Software Quality- 2-day Tester TrainingAnna Russo
 
Full Testing Experience - Visual Studio and TFS 2010
 Full Testing Experience - Visual Studio and TFS 2010 Full Testing Experience - Visual Studio and TFS 2010
Full Testing Experience - Visual Studio and TFS 2010Ed Blankenship
 
Getting started with_testcomplete
Getting started with_testcompleteGetting started with_testcomplete
Getting started with_testcompleteankit.das
 
No More No Repro
No More No ReproNo More No Repro
No More No ReproAnna Russo
 
Testing SharePoint solutions overview
Testing SharePoint solutions overviewTesting SharePoint solutions overview
Testing SharePoint solutions overviewSpiffy
 
Better User Experience with .NET
Better User Experience with .NETBetter User Experience with .NET
Better User Experience with .NETPeter Gfader
 
Getting started with test complete 7
Getting started with test complete 7Getting started with test complete 7
Getting started with test complete 7Hoamuoigio Hoa
 
Unit tests & TDD
Unit tests & TDDUnit tests & TDD
Unit tests & TDDDror Helper
 
Visual Studio 2010 Testing Overview
Visual Studio 2010 Testing OverviewVisual Studio 2010 Testing Overview
Visual Studio 2010 Testing OverviewSteve Lange
 
automation framework
automation frameworkautomation framework
automation frameworkANSHU GOYAL
 
Automated Testing vs Manual Testing
Automated Testing vs Manual TestingAutomated Testing vs Manual Testing
Automated Testing vs Manual TestingDirecti Group
 
Automated+Testing+Vs+Manual+Testing
Automated+Testing+Vs+Manual+TestingAutomated+Testing+Vs+Manual+Testing
Automated+Testing+Vs+Manual+Testinggueste1e4db
 
Automated Testing vs Manual Testing
Automated Testing vs Manual TestingAutomated Testing vs Manual Testing
Automated Testing vs Manual Testingdidev
 
Unit Testing in Flutter - From Workflow Essentials to Complex Scenarios
Unit Testing in Flutter - From Workflow Essentials to Complex ScenariosUnit Testing in Flutter - From Workflow Essentials to Complex Scenarios
Unit Testing in Flutter - From Workflow Essentials to Complex ScenariosFlutter Agency
 

Similar a Coded ui test (20)

STARWEST 2010 - 7 Steps To Improving Software Quality using Microsoft Test Ma...
STARWEST 2010 - 7 Steps To Improving Software Quality using Microsoft Test Ma...STARWEST 2010 - 7 Steps To Improving Software Quality using Microsoft Test Ma...
STARWEST 2010 - 7 Steps To Improving Software Quality using Microsoft Test Ma...
 
STARWEST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...
STARWEST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...STARWEST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...
STARWEST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...
 
STAREAST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...
STAREAST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...STAREAST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...
STAREAST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...
 
Improving Software Quality- 2-day Tester Training
Improving Software Quality- 2-day Tester TrainingImproving Software Quality- 2-day Tester Training
Improving Software Quality- 2-day Tester Training
 
Full Testing Experience - Visual Studio and TFS 2010
 Full Testing Experience - Visual Studio and TFS 2010 Full Testing Experience - Visual Studio and TFS 2010
Full Testing Experience - Visual Studio and TFS 2010
 
Getting started with_testcomplete
Getting started with_testcompleteGetting started with_testcomplete
Getting started with_testcomplete
 
No More No Repro
No More No ReproNo More No Repro
No More No Repro
 
Testing SharePoint solutions overview
Testing SharePoint solutions overviewTesting SharePoint solutions overview
Testing SharePoint solutions overview
 
Better User Experience with .NET
Better User Experience with .NETBetter User Experience with .NET
Better User Experience with .NET
 
Getting started with test complete 7
Getting started with test complete 7Getting started with test complete 7
Getting started with test complete 7
 
Test studio
Test studioTest studio
Test studio
 
Unit tests & TDD
Unit tests & TDDUnit tests & TDD
Unit tests & TDD
 
Practical alm testing
Practical alm   testingPractical alm   testing
Practical alm testing
 
Visual Studio 2010 Testing Overview
Visual Studio 2010 Testing OverviewVisual Studio 2010 Testing Overview
Visual Studio 2010 Testing Overview
 
automation framework
automation frameworkautomation framework
automation framework
 
Automated Testing vs Manual Testing
Automated Testing vs Manual TestingAutomated Testing vs Manual Testing
Automated Testing vs Manual Testing
 
Automated+Testing+Vs+Manual+Testing
Automated+Testing+Vs+Manual+TestingAutomated+Testing+Vs+Manual+Testing
Automated+Testing+Vs+Manual+Testing
 
Automated Testing vs Manual Testing
Automated Testing vs Manual TestingAutomated Testing vs Manual Testing
Automated Testing vs Manual Testing
 
Types of testing
Types of testingTypes of testing
Types of testing
 
Unit Testing in Flutter - From Workflow Essentials to Complex Scenarios
Unit Testing in Flutter - From Workflow Essentials to Complex ScenariosUnit Testing in Flutter - From Workflow Essentials to Complex Scenarios
Unit Testing in Flutter - From Workflow Essentials to Complex Scenarios
 

Más de Abhimanyu Singhal

Containerization with Microsoft Azure
Containerization with Microsoft AzureContainerization with Microsoft Azure
Containerization with Microsoft AzureAbhimanyu Singhal
 
Azure Functions & Serverless Computing
Azure Functions & Serverless ComputingAzure Functions & Serverless Computing
Azure Functions & Serverless ComputingAbhimanyu Singhal
 
Opportunity: Data, Analytic & Azure
Opportunity: Data, Analytic & Azure Opportunity: Data, Analytic & Azure
Opportunity: Data, Analytic & Azure Abhimanyu Singhal
 
Project management with team foundation server 11
Project management with team foundation server 11Project management with team foundation server 11
Project management with team foundation server 11Abhimanyu Singhal
 
Unit testing and test driven development using vs
Unit testing and test driven development using vsUnit testing and test driven development using vs
Unit testing and test driven development using vsAbhimanyu Singhal
 
Unit testing and test driven development using vs
Unit testing and test driven development using vsUnit testing and test driven development using vs
Unit testing and test driven development using vsAbhimanyu Singhal
 
Debugging application using visual studio 2010 and intellitrace
Debugging application using visual studio 2010 and intellitraceDebugging application using visual studio 2010 and intellitrace
Debugging application using visual studio 2010 and intellitraceAbhimanyu Singhal
 
Web and load testing with Visual Studio 2010 Ultimate
Web and load testing with Visual Studio 2010 UltimateWeb and load testing with Visual Studio 2010 Ultimate
Web and load testing with Visual Studio 2010 UltimateAbhimanyu Singhal
 
Database development with visual studio 2010
Database development with visual studio 2010Database development with visual studio 2010
Database development with visual studio 2010Abhimanyu Singhal
 

Más de Abhimanyu Singhal (15)

ASP.NET Core
ASP.NET CoreASP.NET Core
ASP.NET Core
 
Containerization with Microsoft Azure
Containerization with Microsoft AzureContainerization with Microsoft Azure
Containerization with Microsoft Azure
 
Azure Functions & Serverless Computing
Azure Functions & Serverless ComputingAzure Functions & Serverless Computing
Azure Functions & Serverless Computing
 
Mobile devops
Mobile devopsMobile devops
Mobile devops
 
Opportunity: Data, Analytic & Azure
Opportunity: Data, Analytic & Azure Opportunity: Data, Analytic & Azure
Opportunity: Data, Analytic & Azure
 
Using Specflow for BDD
Using Specflow for BDDUsing Specflow for BDD
Using Specflow for BDD
 
Behavior Driven Development
Behavior Driven DevelopmentBehavior Driven Development
Behavior Driven Development
 
Exploratory testing
Exploratory testingExploratory testing
Exploratory testing
 
Project management with team foundation server 11
Project management with team foundation server 11Project management with team foundation server 11
Project management with team foundation server 11
 
Unit testing and test driven development using vs
Unit testing and test driven development using vsUnit testing and test driven development using vs
Unit testing and test driven development using vs
 
Visual Studio ALM
Visual Studio ALMVisual Studio ALM
Visual Studio ALM
 
Unit testing and test driven development using vs
Unit testing and test driven development using vsUnit testing and test driven development using vs
Unit testing and test driven development using vs
 
Debugging application using visual studio 2010 and intellitrace
Debugging application using visual studio 2010 and intellitraceDebugging application using visual studio 2010 and intellitrace
Debugging application using visual studio 2010 and intellitrace
 
Web and load testing with Visual Studio 2010 Ultimate
Web and load testing with Visual Studio 2010 UltimateWeb and load testing with Visual Studio 2010 Ultimate
Web and load testing with Visual Studio 2010 Ultimate
 
Database development with visual studio 2010
Database development with visual studio 2010Database development with visual studio 2010
Database development with visual studio 2010
 

Coded ui test

  • 1. Overview of testing features of Visual studio Module 1 iMentor Knowledge Services
  • 2.
  • 3. Comprehensive, Fast, Accurate, Consistent, Responsive to changes in development process
  • 5. User Interface, Business Logic, Database Components
  • 7.
  • 8. Tester Segmentation Generalist Tester Specialist Tester Manual Testing Some Scripts Creates Batch Files to set up lab, create data Strong Scripting Skills Some Coding Skills Strong Coding Skills Develops fully automated testing procedures Expert coding skills Blank Box Testing White box testing API testing
  • 9. Visual Studio 2010 Testing Stack
  • 10. Microsoft Test Manager Test Planning Creating Test Plans Creating Test Suites Creating & Organizing Test Cases Test Execution (Manual & Scheduled) Running Manual Tests Fast Forward for Manual Tests Logging Rich Bugs
  • 11. A Note on Developer Tester CollaborationAnd No Repro Bugs Developers are from Mars Testers are from Venus
  • 12. Diagnostic Data Adapters Used to collect data or impact a test system Action Log and Action Recording ASP.NET Profiler Code Coverage Intellitrace Event Log System Information Test Impact Video Recorder Network Emuation Custom -> can be created
  • 13. Test Controllers and Test Agents Run Tests Remotely on Multiple Machines Collect Data and Diagnostics Remotely
  • 14. Visual Studio as Test Organizer All tests except Manual are stored as course code files Projects have hundreds/thousands test and keeps growing VS provides test project to create and store tests Test View Window allows test categories to group tests Test list allows Build Integration Test Results can be viewed, saved and published from Studio (TRX)
  • 15. Demonstration Understanding Visual Studio Test Environment Organizing Visual Studio Test Environment Test Lists Window Tests View Test Results Window .vsdmi and .testsettings file Test Settings Window Test Properties
  • 16. Automated Testing Support in Visual Studio Use following windows to run and modify properties for automated test cases Test View Test List Some Important Test Properties Test Name Test Enabled (True/False) Test Type Priority Iteration Test Categories
  • 17. Overview of Coded UI Test
  • 18. Understanding Resilient Playback of Coded UI Tests
  • 19. Platform Support for Coded UI Tests
  • 20. Creating a coded ui test Module 2 iMentor Knowledge Services
  • 21.
  • 22. Generating from an Existing Action Recording ( Converting from manual test recording)
  • 23. Creating a New Coded-UI Test From Scratch
  • 24.
  • 25. To Create a Coded UI test Perform any one of the following tasks: In Solution Explorer, right-click a test project, point to Add, and then click Coded UI Test. In the Test List Editor or the Test View window, right-click the window, and then click New Test. In the Add New Test dialog box, click Coded UI Test and then click OK. On the Test menu, click New Test. In the Add New Test dialog box, click Coded UI Test and then click OK. The Generate Code dialog box appears. From this dialog box, you can select Record actions in your application under test, modify the UI map or add assertions Record your interaction and when done Hit Generate Code and close the recorder
  • 26. The Coded UI Test Recorder Window Shows Currently Recorded Steps Starts Recording users interaction with Desktop Generates Code for Recorded Actions Allows you to select controls and add assertions
  • 27. The Coded UI Test Recorder Window Allows you to pause and start recording Allows you to generate code methods for currently recorded Actions or UI Objects Shows a List of Currently Recorded Steps Allows you to select controls on the user interface and add them to UI Map and Add Assertions on there properties
  • 28. Demonstration Creating Automated Test from manual test Creating Automated Test By Recording Exploring Generated Code
  • 29. Creating Coded UI Test Tips Use the CrossHair to Locate Controls on User Interface Use Navigation button to move between parent and child controls and also peer controls You can pin the recorded steps window so that it is visible always You can delete recorded steps Make Recording Autonomous and Repeatable
  • 30. Reach nested controls using Coded UI Test Builder
  • 32. Generated Code - Classes
  • 33. Coded UI Test Editor
  • 34. Features of Coded UI Test Editor Use Coded UI Test Editor for To locate UI actions and controls. Remove unwanted UI actions. Changes the names for test methods and controls. View and Open Properties Window for selected item. Split one action into multiple methods. Adds custom code to your test methods by moving to UImap.cs Add a pause prior to a UI action specified in milliseconds. Identifies the location of the control in the UI of application under test. To verify control property and significant changes to the application’s controls.
  • 35. Demonstration – Using Coded UI Test Editor
  • 36. Adding More Actions to Coded-UI Test Position Cursor where you want the new Steps to be added in CodedUI Test Method Start Recording and Hit Generate Code Button when done. New Actions are recorded as Methods and added where you had placed your cursor
  • 37. Demonstration Adding more actions to an already recorded Coded-UI Test Method
  • 38. Adding and using Assertions Module 3 iMentor Knowledge Services
  • 39. What are assertions..? Methods that let you validate properties of your user interface elements. You typically compare the value of control properties with an expected value Expected value can be hard code or come from parameters or external files Assertions use the Unit Test assertion methods
  • 40. Adding Assertions using Coded-UI Test Builder
  • 41. Adding Assertions Right click in Coded-UI Test method and select first option “use coded UI test builder” Click on the cross hair (third button) and drag and drop on the control you want to validate Add assertions form will be shown, you can navigate through the controls and reach the top most control or form and see its properties. You can add assertion to any of the properties shown Right click on the inner text which we are interested in and click on add assertion Select comparator and comparison value and click on Ok Click on generate code button. Enter appropriate method name
  • 42. Demonstration Adding Assertions to Coded-UI Test Understanding Assertion Methods
  • 43. Customizing Assertion Methods Customize the assertion methods by moving them to UIMap.cs file from UIMap.designer.cs Add Advance Features to assertions by using .NET framework related classes that help in validation
  • 44. Demonstration Customizing Assertion Methods Advanced Assertion Methods
  • 45. Adding un-used controls to UI Map Add Control to UI Map without recording or Asserting
  • 46. Demonstration Add Control to UI Map without recording or Asserting

Notas del editor

  1. SearchUsing the top level window and technology information, playback uses the right accessibility API to locate the control. Search has lot features to be successful even if the app is going through changes. Search algorithm for Winforms is complex as many applications do not have proper accessibility support.WFRWFR stands for Wait For Ready, where actions on a control is deferred till the application is ready for user actions. In winforms there is no proper ways to know if the application is busy or not, so we only depend on foreground thread on the application to determine if it is ready for actionsEnsure VisibleThis feature will make sure the control is present in the visible area of the screen so that actions can be performed. This is accomplished in two ways, by doing setfocus on the control or scroll the window to make the control visible.UISyncOnce the action is performed UISync component will ensure that the Application Under Test (AuT) received the action. This will ensure that if playback completed successfully then one can assume that all actions completed successfully.
  2. Show the TestMethodFile and Explain - > The TestMethod and How it is based on UnitTestsShow the Uimap.uiTest file and Show actions, objects and data as recorded in XML file
  3. The Coded UI Test Editor toolbar offers the following commands:1 - Find helps to locate UI actions and controls.2- Delete removes unwanted UI actions.3 - Rename changes the names for test methods and controls.4 - Properties Opens the Properties Window for selected item.5 - Split into a new method lets you modularize the UI actions.6 - Move Code adds custom code to your test methods.7 - Insert Delay Before adds a pause prior to a UI action specified in milliseconds.8 - Locate the UI Control identifies the location of the control in the UI of application under test.9 - Locate All helps to verify control property and significant changes to the application’s controls.