Documente Academic
Documente Profesional
Documente Cultură
Introductions
Name
Title/Function
Job Responsibility
Testing Experience
C# Experience
Expectations for the Course
GSAtrain
Course Materials
GSAtrain
Course Contents
Course Contents
(Continued)
6) Data Driven Coded UI Tests
7) Anatomy of Code UI Tests
8) Introduction to Lifecycle Management
9) Extending Coded UI Tests and Action Recordings
10) Testing Large Applications with Multiple UI
Maps
GSAtrain
Course Contents
(continued)
11) Using HTML5 Controls in Coded UI Tests
12) Visual Studio 2012 ALM Features
13) Upgrading Coded UI Tests from
Visual Studio 2010
14) Using WPF with Coded UI Tests
15) Best Practices for Coded UI Tests
GSAtrain
Course Contents
(optional)
16) Using the Coded UI Test Logs
17) Using SharePoint with Coded UI Tests
18) ExcelCodedUIHelper
GSAtrain
Module 1
Overview of Automated
Coded UI Testing
GSAtrain
UI Testing
o Functional Testing
Controls
User Interface
Whole Application
Reality of Automated
Testing
70% of all Testing is manual
GSAtrain
10
11
IT Has a Problem
GSAtrain
12
13
GSAtrain
14
15
GSAtrain
16
Manual to Coded UI
GSAtrain
17
18
GSAtrain
19
Module 2
Walkthrough Steps
from Beginning-to-End
GSAtrain
20
21
Plan
GSAtrain
Design
Test
Track
22
Verify
Autom
ate
Building an App
For Manual Testing
Demo of Simple Calculator
GSAtrain
23
Demo
GSAtrain
24
Adding Data
Demo
GSAtrain
25
Introducing an Error
Demo
GSAtrain
26
Hands-On Lab
27
Module 3
Creating Manual Tests
GSAtrain
28
GSAtrain
29
GSAtrain
30
Testing Center
GSAtrain
31
GSAtrain
32
http://msdn.microsoft.com/en-us/library/
dd380763.aspx
GSAtrain
33
GSAtrain
o http
://channel9.msdn.com/Series/Visual-Studio-2
012-Premium-and-Ultimate-Overview/Visual-St
udio-Ultimate-2012-Easily-reproducing-issue
s-through-manual-testing
34
Module 4
Creating a Coded UI Test
Using Coded UI Test Builder
GSAtrain
35
GSAtrain
36
GSAtrain
37
GSAtrain
38
GSAtrain
39
GSAtrain
40
41
GSAtrain
42
43
44
45
46
GSAtrain
47
48
49
50
Application Tier:
What Does TFS Offer?
First we find all web services for team project
collections
We all recognize this so no further explanation is
necessary:
o Version control
o Build service
o Lab management
o Work Item tracking
o Team Foundation Framework services
GSAtrain
51
Application Tier:
What Does TFS Offer?
(continued)
52
GSAtrain
53
GSAtrain
54
GSAtrain
55
Testers Benefits
After you have run your tests, you can report on your
progress
When you use test plans to structure your testing
approach, you can answer the following questions:
o How many tests have passed or failed?
o How many tests still have to be run for this iteration?
o When will the testing be complete?
o Which areas of the product have high test failure rates?
GSAtrain
56
Testers Benefits
(continued)
o Which test configurations have high test
failure rates?
o Who has the most tests left to be run?
o Can resources be reallocated to better balance
the remaining testing?
o Which build should the testers be using
based on code changes and bug fixes?
GSAtrain
57
GSAtrain
58
Creating a CUIT
59
GSAtrain
60
Required Software
GSAtrain
61
Planned
Exploratory
Load and Muli-user
GSAtrain
62
GSAtrain
63
Exploratory Testing
64
Benefits of
Exploratory Testing
The main advantage of exploratory testing is that
less preparation is needed, important bugs are
found quickly, and at execution time, the approach
tends to be more intellectually stimulating than
execution of scripted tests
Another major benefit is that testers can use
deductive reasoning based on the results of previous
results to guide their future testing on the fly
GSAtrain
65
Benefits of
Exploratory Testing
(continued)
Another benefit is that, after initial testing, most
bugs are discovered by some sort of exploratory
testing
This can be demonstrated logically by stating,
"Programs that pass certain tests tend to continue to
pass the same tests and are more likely to fail other
tests or scenarios that are yet to be explored
WikiPedia
GSAtrain
66
DrawBacks of
Exploratory Testing
Disadvantages are that tests invented and performed on the fly
can't be reviewed in advance (and by that prevent errors in code
and test cases), and that it can be difficult to show exactly which
tests have been run
Freestyle exploratory test ideas, when revisited, are unlikely to
be performed in exactly the same manner, which can be an
advantage if it is important to find new errors; or a disadvantage
if it is more important to repeat specific details of the earlier tests
o Can be controlled with specific instruction to the tester, or by preparing
automated tests where feasible, appropriate, and necessary, and ideally
as close to the unit level as possible
GSAtrain
67
Exploratory Testing
68
GSAtrain
69
Visual Studio
and Exploratory Testing
Performing Exploratory Testing Using Microsoft
Test Manager
o In Microsoft Test Manager:
Open Testing Center
Test
Do Exploratory Testing
70
GSAtrain
71
72
73
74
Contents Test
Configurations
GSAtrain
75
Establish Environments
Diagnostic Connectors
Best Practice
o Work with Development Teams
o The Developers need to have the same tools to view the test
data you collected for them
76
Using Builds
Scout
o Installing Software and running some initial tests
o After the SCOUT is successful it can become a
template for other Testers
77
78
Defining Multiple
Test Configurations
Environments may differ:
o IE 8,9,10
o Ipad Horizontal/Vertical
o BYOD
o HTML5
o
GSAtrain
Etc.
79
Module 5
Automating
Coded UI Test Cases
GSAtrain
80
81
Types of Tests
83
84
Functional Tests
85
Exploratory Testing
86
Capability Testing
87
Exploratory Testing
88
GSAtrain
89
Story Boards
90
Story Boards
(continued)
o What states can an expense report be in?
o When is it possible to change or remove an
expense report?
o What data is required in an expense report to
register it correctly?
o Where are the expense reports stored? For how
long?
GSAtrain
91
92
93
Hands-On Lab
GSAtrain
94
Module 6
Data Driven Tests
GSAtrain
95
96
Create errors
Add new Cases
Modify the rows
Automation can be changed by using
different files
GSAtrain
97
Hands-On Lab
How to Create
a Data-Driven Coded UI Test
GSAtrain
98
GSAtrain
99
Module 7
Anatomy of
Coded UI Tests
GSAtrain
100
101
GSAtrain
File
Contents Editable?
UIMap.Designer.cs
Declarations
section
UIMap class
(partial, autogenerated)
Methods
Properties
No
UIMap.cs
UIMap class
(partial)
Yes
CodedUITest1.cs
CodedUITest1 class
Methods
Properties
Yes
102
103
Declarations section
using System;
using System.CodeDom.Compiler;
using System.Collections.Generic;
using System.Drawing;
using System.Text.RegularExpressions;
using System.Windows.Input;
using Microsoft.VisualStudio.TestTools.UITest.Extension;
using Microsoft.VisualStudio.TestTools.UITesting;
using Microsoft.VisualStudio.TestTools.UITesting.WinControls;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Keyboard =
Microsoft.VisualStudio.TestTools.UITesting.Keyboard;
using Mouse = Microsoft.VisualStudio.TestTools.UITesting.Mouse;
using MouseButtons = System.Windows.Forms.MouseButtons
GSAtrain
104
Module 8
Introduction to
Lifecycle Management
GSAtrain
105
106
Lifecycle Management
107
Lifecycle Management
(continued)
These practices can help your team create software that is
valued by your customers and that is faster and more reliable.
You can use these tools to achieve the following results:
o Visual Studio Application Lifecycle Management (ALM) provides
you and your team with the tools to effectively manage the lifecycle
to develop applications
o As the following illustration shows, you and your team can use these
tools to tell user stories, to manage the backlog, plan a sprint, and
run a sprint, to engage stakeholders to provide continuous feedback,
and to easily incorporate feedback to support the next iteration of
software
GSAtrain
108
ALM Cycles
GSAtrain
109
GSAtrain
110
111
Types of Tests
Supported by VS 2012
Manual Tests
Coded UI Tests
Unit Tests
Web Performance Tests
Load Tests
Generic Tests
Ordered Tests
GSAtrain
112
Testing Pyramid
GSAtrain
113
Testing Structures
GSAtrain
114
Demo
LAB
GSAtrain
115
Assigning Configurations
Demo
GSAtrain
116
Manual Tests
GSAtrain
117
Coded UI Tests
118
Unit Tests
119
Unit Tests
(continued)
Test written before the object
It will initially fail
o Correct
o Re-test
o Refactor
o Repeat
120
GSAtrain
121
Load Tests
GSAtrain
122
Generic Tests
GSAtrain
123
Ordered Tests
GSAtrain
124
GSAtrain
125
126
Developers view
Test-Driven Development
Unit Testing
GSAtrain
127
Test-driven development
(TDD)
WikiPedia
Is a software development process that relies on
the repetition of a very short development cycle:
o First the developer writes an (initially failing)
automated test case
That defines a desired improvement or new function
Then produces the minimum amount of code to
pass that test
Refactors the new code to acceptable standards
GSAtrain
128
Testers View
GSAtrain
129
Requirements-Driven Testing
130
Components of
Coded UI Testing
Test Runner:
o The Test Runner from MTM can create action recordings from a
manual test
o The action recording can later be used to play back the test session
in MTM or to generate a Coded UI test from the recorded steps
Coded UI Test:
o The implementation of the actual test written in C# or VB.NET
o The Coded UI Test is either generated by the Coded UI Test
builder code generator or coded directly against the Coded UI Test
API
GSAtrain
131
Components of
Coded UI Testing (continued)
Test Recorder:
Records actions from a test session, which then
can be used by the Test Runner to automate a
generated test or by the coded generator to create
a Coded UI test
Coded UI Test API:
The Coded UI Test API can be used to create UI tests
which are more tightly connected to the UI elements
GSAtrain
132
Components of
Coded UI Testing (continued)
Technology Managers:
These are the core components responsible
for mapping UI elements to the underlying
technology (i.e. web browser or a rich client)
We can implement custom plug-ins to
support platforms which the native plug-ins
does not support
GSAtrain
133
GSAtrain
134
GSAtrain
135
Supported Platforms
Internet Explorer 8, 9, 10
Windows Forms 2.0 and later
WPF 3.5 and later
Windows Win32 (not officially supported but may work)
MFC (partially)
SharePoint (partially)
Dynamics CRM
Citrix/Terminal Services (partially)
PowerBuilder (partially)
GSAtrain
136
GSAtrain
137
Parameterized Testing
138
Regression Testing
139
Under-the-UI Testing
GSAtrain
140
There are several options for us to start a test run, for instance:
o Run all tests in a test suite
o Locate the Suite Id from the test suite in MTM
tcm run /create /title:"UI Test Run" /planid:5
/suiteid:11 /configid:2
/collection:http://tfs.kangreen.com:8080/tfs
/teamproject:"Expense Reporting"
GSAtrain
141
You can use tcm.exe to figure out the Ids for plans, suites,
and configurations as well:
o List plans
tcm plans /list /collection:http://tfs.kangreen.com:8080/tfs
/teamproject:"Expense Reporting"
o List suites
tcm suites /list /collection:http://tfs.kangreen.com:8080/tfs
/teamproject:"Expense Reporting"
o List configurations
tcm configs /list /collection:http://tfs.kangreen.com:8080/tfs
/teamproject:"Expense Reporting"
GSAtrain
142
http://channel9.msdn.com/Series/VisualStudio-2012-Premium-and-Ultimate-Overvi
ew/Visual-Studio-Ultimate-2012-Easily-t
esting-user-interfaces-with-Coded-UI-te
sts
GSAtrain
143
GSAtrain
144
Benefits of Automated
Testing
Automated tests can quickly test whether
your application is still working correctly
after code changes have been made to
your application
Automating Test should not take more
than about 40% of team members' time
GSAtrain
145
146
GSAtrain
147
Thinking About
These Different Levels
The idea of thinking about these
different levels is good because it allows
us to write
o UI-level tests that are easy to understand
o Efficient to write
o Relatively inexpensive to maintain
GSAtrain
148
Thinking About
These Different Levels (continued)
149
GSAtrain
150
Manual to Coded UI
GSAtrain
151
Module 9
Extending Coded UI
Tests and Action
Recordings
GSAtrain
152
GSAtrain
153
Module 10
Upgrading Coded UI Tests from
Visual Studio 2010
GSAtrain
154
Module 11
Extending Coded UI Tests
and Action Recordings
GSAtrain
155
156
157
Architecture Overview
GSAtrain
158
Module 12
Testing Large Applications
with Multiple UI Maps
GSAtrain
159
Module 13
Using HTML5 Controls
in Coded UI Tests
GSAtrain
160
Module 14
Using WPF with
Coded UI Tests
GSAtrain
161
Module 15
Best Practices
for Coded UI Tests
GSAtrain
162
Best Practices
For Coded UI Tests
Create a new test method for each new page, form, or dialog box
GSAtrain
163
Best Practices
For Coded UI Tests (continued)
164
Best Practices
For Coded UI Tests (continued)
GSAtrain
165
Best Practices
For Coded UI Tests (continued)
If you are directly coding with the API, use the properties
and methods in the classes generated in the
UIMap.Designer.cs file in your code as much as you can
These classes will make your work easier, more reliable, and
will help you be more productive
GSAtrain
166
What to Do If Your
User Interface Changes
User interfaces frequently change during
development
Here are some ways to reduce the effect of these
changes:
Find the recorded method which references this control
and use the Coded UI Test Builder to re-record the
actions for this method
You can use the same name for the method to overwrite
the existing actions
GSAtrain
167
What to Do If Your
User Interface Changes (continued)
168
What To Do If A Background
Process Needs to Complete Before
The Test Can Continue
// Set the playback to wait for all threads to finish
Playback.PlaybackSettings.WaitForReadyLevel =
WaitForReadyLevel.AllThreads;
// Press the submit button
this.UIMap.ClickSubmit();
// Reset the playback to wait only for the UI thread to finish
Playback.PlaybackSettings.WaitForReadyLevel =
WaitForReadyLevel.UIThreadOnly;
GSAtrain
169
http://blogs.msdn.com/b/visualstudioalm/a
rchive/2012/06/05/enabling-coded-ui-testplayback-logs-in-visual-studio-2012-relea
se-candidate.aspx
GSAtrain
170
Module 17
Evolution of Testing
GSAtrain
171
Evolution of Testing
In-Line Programs
Sub-Routines
Functions
Time Sharing
On-Line Terminals
Client Sever
3 Tier Architecture
Thin Client
MVC
SOA
GSAtrain
172
De Coupling of
Software Testing
Developers View Individual Units of
Code
Administrators Build Environments and
Versions
Testers Test Complete Applications
GSAtrain
173
174
Microsofts Commitment
To The Cloud
Microsoft Windows 2012
Windows 8
Office 2013
Office365
SQL 2012
SharePoint 2012
LINQ 2012
o are all Cloud SOA Oriented
GSAtrain
175
Azure Services
176
Testing is Moving
To The CLOUD
Microsoft TFS is now Cloud Based
GSAtrain
177
GSAtrain
178
179
GSAtrain
180
Service Oriented
Architecture
Interface Testing
Viewing Objects from the outside
Leads to Unit Testing
Test-Driven Design
GSAtrain
181
IT Has a Problem!
GSAtrain
182
GSAtrain
183
-- the specific requirements for XaaS: resource pooling and virtualization , elasticity and
multi-tenancy, dynamic configuration and provisioning
Cloud paradigm leverages SOA to deliver a charge-based model for non-business specific
services;
-- infrastructure/hardware
-- software
--platform
https://www.ibm.com/developerworks/mydeveloperworks/blogs/AliArsanjani/?
order=asc&maxresults=15&sortby=0&lang=en
GSAtrain
184
SIMM
GSAtrain
https://www2.opengroup.org/ogsys/pu
blications/viewDocument.html?
publicationid=12450&documentid=1
1340
185
Vulnerabilities
Security
Testing
GSAtrain
186
Definition of a Service
Discoverable
Self-Describing
Composable
Loose Coupling
Governed by Policy
Independent of Location, Language and Protocol
GSAtrain
187
GSAtrain
188
IT Benefits Of SOA
GSAtrain
189
SOA
GSAtrain
190
SOA
GSAtrain
191
SOA
GSAtrain
192
GSAtrain
193
SOA
GSAtrain
194