Contenu connexe Similaire à Augmenting Coded UI (20) Augmenting Coded UI1. © 2013 LogiGear Corporation. All rights reserved.
Augmenting Coded UI
with Action-Based
Test Automation
Microsoft | LogiGear
2. © 2013 LogiGear Corporation. All rights reserved.
10x
Speed Maintainability Reusability Scalability
3. © 2013 LogiGear Corporation. All rights reserved.
- Quickly and easily create a large number of tests
Speed
10x
4. © 2013 LogiGear Corporation. All rights reserved.
- Quickly and easily create a large number of tests
- Maintain tests when the application or GUI changes
Speed
10x
Maintainability
5. © 2013 LogiGear Corporation. All rights reserved.
- Quickly and easily create a large number of tests
- Maintain tests when the application or GUI changes
- Focus on reusable test design and flow, not test programming
Speed
10x
Maintainability Reusability
6. © 2013 LogiGear Corporation. All rights reserved.
- Quickly and easily create a large number of tests
- Maintain tests when the application or GUI changes
- Focus on reusable test design and flow, not test programming
- Execute data-driven testing for coverage and scalability
Speed
10x
Maintainability Reusability Scalability
7. © 2013 LogiGear Corporation. All rights reserved.
- Quickly and easily create a large number of tests
- Maintain tests when the application or GUI changes
- Focus on reusable test design and flow, not test programming
- Execute data-driven testing for coverage and scalability
- Enable test understanding and team collaboration
Speed
10x
Maintainability Reusability Scalability
8. © 2013 LogiGear Corporation. All rights reserved.
Keyword-driven
methodology
Modular
test design
Solution
architecture and
functionality
Automation Engine
Action
Library
Interface
Test ModuleTest ModuleTest Module
Test Development Plan
9. © 2013 LogiGear Corporation. All rights reserved.
def action_NewProduct
. . . .
def action_AddQuantity
. . . .
def action_CheckQuantity
. . . .
Keywords and Actions
© 2013 LogiGear Corporation. All rights reserved.
10. © 2013 LogiGear Corporation. All rights reserved.
Click
Select
Click
Click
Checkout.
Order Entry
Low-level actions …
… combined to make
higher-level actions
… combined to
make higher-
level actions
© 2013 LogiGear Corporation. All rights reserved.
Action-Based Testing
Methodology
Keyword-driven
11. © 2013 LogiGear Corporation. All rights reserved.
OK
SUBMIT
Every instance of the changed
action is automatically updated
Action-Based Testing
Methodology
Reusability
© 2013 LogiGear Corporation. All rights reserved.
12. © 2013 LogiGear Corporation. All rights reserved.© 2013 LogiGear Corporation. All rights reserved.
CHECK
PAYMENT
CLOSE
APP
RENT
CAR
Action Library
Custom Actions
START
APP
TEST MODULE Car Rental
user key
TEST CASE TC 01 Rent Cars
first name last name car
last name amount
FINAL Exit App
window
start app sam
rent car Sam Doe Ford Escape
check payment Doe 89.95
close app reservation
PROCESS
ORDER
CONFIG
ACCNT
ADD
INS
CHANGE
ORDER
LIST
CARS
PRINT
RECEIPT
Easy-to-use test creation for readable, understandable test flows
CLOSE
APP
START
APP
CHECK
PAYMENT
RENT
CAR
13. © 2013 LogiGear Corporation. All rights reserved.
… results in only a small increase in additional actions
2000
tests
200
actions
20 functions
A large increase in test cases …
4000
tests
250
actions
22 functions
14. © 2013 LogiGear Corporation. All rights reserved.
Cash Flow
Optimization
Reconcile
Statements
Management
Image
Verification
Authorization
Authentication
Access Mgmnt
Risk/Fraud
Mitigation
Crime
Detection
Transaction
Monitoring
Data Comm
Real-time
Processing
Test Development Plan
Business Objective
Business ObjectiveBusiness Objective
ManagementCrime
Detection
Real-time
Processing
15. © 2013 LogiGear Corporation. All rights reserved.
Keyword-driven
methodology
Modular
test design
Solution
architecture and
functionality
Automation Engine
Action
Library
Interface
Test ModuleTest ModuleTest Module
Test Development Plan
16. © 2013 LogiGear Corporation. All rights reserved.© 2013 LogiGear Corporation. All rights reserved.
Objective-driven process at the Business-object level
Test Development Plan• Top-down Test Development Plan
17. © 2013 LogiGear Corporation. All rights reserved.© 2013 LogiGear Corporation. All rights reserved.
Objective
Test Module
Objective
Test Module
Objective
Test Module
Test Modules, not Test Cases, are the main testing component
Test Development Plan• Top-down Test Development Plan
• Business-level Test Module objectives
18. © 2013 LogiGear Corporation. All rights reserved.© 2013 LogiGear Corporation. All rights reserved.
Test ModuleTest ModuleTest Module
TEST
CASE
The best method to scale automation to 100’s or 1000’s of test cases
Test Development Plan• Top-down Test Development Plan
• Business-level Test Module objectives
• Objective-driven Test Cases with
similar “scope”
TEST
CASE
TEST
CASE
19. © 2013 LogiGear Corporation. All rights reserved.© 2013 LogiGear Corporation. All rights reserved.
Test Module
TC
Test Development Plan• Top-down Test Development Plan
• Business-level Test Module objectives
• Objective-driven Test Cases with
similar “scope”
• Action Library and Interfaces drive
test case operation
Test Module
TC
Test Module
TC
ACTION
LIBRARY
INTERFACE
20. © 2013 LogiGear Corporation. All rights reserved.© 2013 LogiGear Corporation. All rights reserved.
• Top-down Test Development Plan
• Business-level Test Module objectives
• Objective-driven Test Cases with
similar “scope”
• Action Library and Interfaces drive
test case operation
• Automation engine to execute
Test Cases
Separate test development and test automation environments
Test Module
TC
Automation Engine
Test Development Plan
Test Module
TC
Test Module
TC
ACTION
LIBRARY
INTERFACE
21. © 2013 LogiGear Corporation. All rights reserved.© 2013 LogiGear Corporation. All rights reserved.
• Suited for complex, enterprise-level test
projects
• Test modules, with readable, understandable
test flows
• High team involvement, collaboration and
communication
• Emphasis on test design, test flow and test
project organization
− Less focus on tools, technology, and
programming details
Focus on test design and test flow, not on test programming
Test Module
TC
Automation Engine
ACTION
LIBRARY
INTERFACE
Test Development Plan
Test Module
TC
Test Module
TC
22. © 2013 LogiGear Corporation. All rights reserved.© 2013 LogiGear Corporation. All rights reserved.
Cash Flow
Optimization
Reconcile
Statements
Management
Image
Verification
Authorization
Authentication
Access Mgmnt
Risk/Fraud
Mitigation
Crime
Detection
Transaction
Monitoring
Data Comm
Real-time
Processing
Test Development Plan
Business Objective
Business ObjectiveBusiness Objective
ManagementCrime
Detection
Real-time
Processing
23. © 2013 LogiGear Corporation. All rights reserved.© 2013 LogiGear Corporation. All rights reserved.
Cash Flow
Optimization
Reconcile
Statements
Management
Image
Verification
Authorization
Authentication
Access Mgmnt
Risk/Fraud
Mitigation
Crime
Detection
Transaction
Monitoring
Data Comm
Real-time
Processing
Automation Engine
ACTION
LIBRARY
INTERFACE
Security
Business-level
Objectives
Transaction
Business-level
Objectives
Access
Business-level
Objectives
Test Module Test Module Test Module
Test Development Plan
24. © 2013 LogiGear Corporation. All rights reserved.
Keyword-driven
methodology
Modular
test design
Solution
architecture and
functionality
Automation Engine
Action
Library
Interface
Test ModuleTest ModuleTest Module
Test Development Plan
25. © 2013 LogiGear Corporation. All rights reserved.
Test Design
Test
Objectives
Test Lines
(with Actions)
Test
Modules
Action
Definitions
Interface
Definitions
Custom
Scripts
Test Development Test Automation
Test and
Action
Repository
Architecture and functionality
designed for Action-Based Testing
Integrated in the Quality
Enablement process
Extension in Microsoft Visual
Studio 2012, and TFS/MTM
Continuous Integration
environment
26. © 2013 LogiGear Corporation. All rights reserved.
Architecture and functionality
designed for Action-Based Testing
Integrated to the Quality
Enablement process
Extension in Microsoft Visual
Studio 2012, and TFS/MTM
Continuous Integration
environment
source:Microsoft,withpermission
27. © 2013 LogiGear Corporation. All rights reserved.
Architecture and functionality
designed for Action-Based Testing
Integrated to the Quality
Enablement process
Extension in Microsoft Visual
Studio 2012 and TFS/MTM
Continuous Integration
environment
Team
Foundation
Server
Microsoft
Test
Manager
Visual
Studio
28. © 2013 LogiGear Corporation. All rights reserved.© 2013 LogiGear Corporation. All rights reserved.
TC n
src ctrl
click add OK
TC n
src ctrl
click add OK
TC n
src ctrl
click add OK
TC n
src ctrl
click add OK
TC n
src ctrl
click add OK
Test Scripts
Application
Under Test
50Quantity
usenailsDescr
123Number
hammerName
Add
OK
Test Scripts are fragile when linked directly to the application
29. © 2013 LogiGear Corporation. All rights reserved.© 2013 LogiGear Corporation. All rights reserved.
50Quantity
usenailsDescr
123Number
hammerName
Add
TC n
src ctrl
click add OK
TC n
src ctrl
click add OK
TC n
src ctrl
click add OK
TC n
src ctrl
click add OK
TC n
src ctrl
click add OK
Test Scripts
OK
Application
Under Test
When application code changes, test scripts require maintenance
30. © 2013 LogiGear Corporation. All rights reserved.© 2013 LogiGear Corporation. All rights reserved.
INTERFACE Add Product
Name ID TA Name
ORDER_Button 34 OK
50Quantity
usenailsDescr
123Number
hammerName
Add
TC n
src ctrl
click add OK
TC n
src ctrl
click add OK
TC n
src ctrl
click add OK
TC n
src ctrl
click add OK
TC n
src ctrl
click add OK
Test Cases
INTERFACE
Application
Under Test
Test Cases are linked to a user-defined logical name in the interface
31. © 2013 LogiGear Corporation. All rights reserved.© 2013 LogiGear Corporation. All rights reserved.
INTERFACE Add Product
Name ID TA Name
ORDER_Button 34 OK
50Quantity
usenailsDescr
123Number
hammerName
Add
TC n
src ctrl
click add OK
TC n
src ctrl
click add OK
TC n
src ctrl
click add OK
TC n
src ctrl
click add OK
TC n
src ctrl
click add OK
Test Cases
INTERFACE
Application
Under Test
Interface is linked to the control properties of the application
32. © 2013 LogiGear Corporation. All rights reserved.© 2013 LogiGear Corporation. All rights reserved.
number name description quantity
row 57463292 Tires Radial tires 8
row 45892135 Axles Between the wheels 10
row 32198327 Wheels 17 inch wheels 24
row 32014827 Taillights Red plastic 326
row 03512305 Headlights For nighttime driving 22
name criterion
filter high quantity quantity > 8
filter low quantity quantity < 100
number name description quantity
row 57463292 Tires Radial tires 8
row 45892135 Axles Between the wheels 10
row 32198327 Wheels 17 inch wheels 24
row 32014827 Taillights Red plastic 326
row 03512305 Headlights For nighttime driving 22
name criterion
filter high quantity quantity > 8
filter low quantity quantity < 100
name
use data set /Inventory Data Set
number name description quantity
add product #number #name #description #quantity
name number description quantity
check product #name #number #description #quantity
repeat for data set
number name description quantity
row 57463292 Tires Radial tires 8
row 45892135 Axles Between the wheels 10
row 32198327 Wheels 17 inch wheels 24
row 32014827 Taillights Red plastic 326
row 03512305 Headlights For nighttime driving 22
name criterion
filter high quantity quantity > 8
filter low quantity quantity < 100
Multiple data sets applied to a single Test Module for code coverage
Test Module
TEST
CASE
TEST
CASE
TEST
CASE
TEST
CASE
33. © 2013 LogiGear Corporation. All rights reserved.© 2013 LogiGear Corporation. All rights reserved.
UI
automation
testing
source:Microsoft,withpermission
34. © 2013 LogiGear Corporation. All rights reserved.© 2013 LogiGear Corporation. All rights reserved.
UI automation
testing
Keyword
Based
source:Microsoft,withpermission
Test Case
35. © 2013 LogiGear Corporation. All rights reserved.
• Build and check-in
tests into TFS
• Associate the tests to
MTM tests
• Run the tests in MTM
and examine the results
Microsoft TFS / MTM
Continuous Integration
© 2013 LogiGear Corporation. All rights reserved.
36. © 2013 LogiGear Corporation. All rights reserved. © 2013 LogiGear Corporation. All rights reserved.
37. © 2013 LogiGear Corporation. All rights reserved.
Coded UI tests run as part
of the unit testing suite
Coded UI tests in the
familiar Solution Explorer,
are a part of source control
© 2013 LogiGear Corporation. All rights reserved.
38. © 2013 LogiGear Corporation. All rights reserved. © 2013 LogiGear Corporation. All rights reserved.
39. © 2013 LogiGear Corporation. All rights reserved. © 2013 LogiGear Corporation. All rights reserved.
40. © 2013 LogiGear Corporation. All rights reserved. © 2013 LogiGear Corporation. All rights reserved.
41. © 2013 LogiGear Corporation. All rights reserved. © 2013 LogiGear Corporation. All rights reserved.
42. © 2013 LogiGear Corporation. All rights reserved.
Create a high-level action:
add plane to cart
© 2013 LogiGear Corporation. All rights reserved.
43. © 2013 LogiGear Corporation. All rights reserved.
High-level action:
add plane to cart
© 2013 LogiGear Corporation. All rights reserved.
44. © 2013 LogiGear Corporation. All rights reserved. © 2013 LogiGear Corporation. All rights reserved.
Identical keyword
actions and Coded UI
functionality
Lower-level programming
details are hidden from
the test flow
45. © 2013 LogiGear Corporation. All rights reserved.
Readable,
understandable
test flow
add plane to cart
Re-use the same
high-level action
multiple times
© 2013 LogiGear Corporation. All rights reserved.
46. © 2013 LogiGear Corporation. All rights reserved.
www.TestArchitect.com
© 2013 LogiGear Corporation. All rights reserved.
Notes de l'éditeur Hello. I would like to welcome to this webinar onHow to augment your coded UI environment with Test Automation, to greatly improve the quality of your application software.My name is ABT separates the Test Cases from the Application under test, through an Easy-to-define Interface ABT separates the Test Cases from the Application under test, through an Easy-to-define Interface ABT separates the Test Cases from the Application under test, through an Easy-to-define Interface ABT separates the Test Cases from the Application under test, through an Easy-to-define Interface Software testing with Visual Studio 2012 is focused on testing all aspects of your application.Test planning and management, manual testing and exploratory testing are handled from Microsoft Test Manager.Automated testing, unit testing, performance and load testing, and code analysis are handled from the Visual Studio IDE.All aspects of the testing lifecycle are monitored and managed with Team Foundation Server, enabling up to date reporting across the entire project.Extensibility points enable 3rd party solutions, customizable build engines and complex lab environments.This module focuses on Build Automation practices to validate quality at a continuous cadence when developing software as a team. UI Automation test creation is handled from the Visual Studio IDE. There are three methods for creating these tests: manual creation via code, keyword based scripts (using the preferred partner solution LogiGear), recording your actions as you interact with the UI, or importing an existing manual test case that has an action recording. Once the test has been created in the IDE, it can be ran from the IDE itself directly, from Test Manager, or automated as part of an automated build or deploy scenario. Automated UI tests can be associated with test cases in TFS for maximum visibility. Just like all other types of testing in Visual Studio, automated UI tests are backed by Team Foundation Server, enabling up to the minute detailed reporting. Depending on the method of execution, bugs can be created (directly in the case of MTM execution, or part of a failed build in the case of complete automation). Talk Track:<see slide> Talk Track:As coded UI tests are code, you can attach them to your continuous integration build verification tests, or other automated builds to ensure that defects in your application’s UI are discovered as soon as possible. Talk Track:Teams often worry that reducing their deployment cycle time will reduce overall quality. It’s a real risk, but it can be avoided if you modernize your quality management system as well. With MTM and the Visual Studio 2012 ALM solution, your quality management integrates seamlessly into your modern development platform, ensuring that velocity and quality will go hand in hand.