1.62k likes | 1.85k Views
Automating Coded UI Testing using Microsoft Testing Tools in Visual Studio 2012. Clive G Hermann. Introductions. Name Title/Function Job Responsibility Testing Experience C# Experience Expectations for the Course. Course Materials. Course Contents. Overview of Automated Code UI Testing
E N D
Automating Coded UI Testing using Microsoft Testing Tools in Visual Studio 2012 Clive G Hermann
Introductions • Name • Title/Function • Job Responsibility • Testing Experience • C# Experience • Expectations for the Course
Course Contents • Overview of Automated Code UI Testing • Walkthrough steps from beginning-to-end • Creating Manual Tests • Creating a coded UI test Using Coded UI Test Builder • Automating Coded UI Test Cases • Introduction to Application Lifecycle Management (ALM) • Anatomy of Coded UI Tests • New Visual Studio 2012 ALM Features • Automating Coded UI Tests
Course Contents2 • Data Driven Coded UI Tests • Anatomy of Code UI Tests • Introduction to Lifecycle Management • Extending Coded UI Tests and Action Recordings • Testing Large Applications with Multiple UI Maps • Using HTML5 Controls in Coded UI Tests • Visual Studio 2012 ALM Features • Upgrading Coded UI Tests from Visual Studio 2010
Course Contents3 • Using WPF with Coded UI Tests • Best Practices for Coded UI Tests • Using the Coded UI Test Logs • Using SharePoint with Coded UI Tests • ExcelCodedUIHelper
Reality of Automated Testing • 70% of all Testing is manual
Code UI Tsting • Replacing a Manual User Interface Test • With a Automated User Interface Test • To Allow: • Replication • Consistency • Regression Testing For: • Multiple Environments • Multiple Versions
1) Overview of Automated Code UI Testing • UI Testing • Functional Testing • Controls • User Interface • Whole Application • The earlier we catch a “bug” or potential problem the less it costs! • Image • Manpower
Test Early and Often • Catching defects as early as possible is the least expensive way to ensure software quality. • Kent Beck and Cynthia Andres wrote • "Here is the dilemma in software development: defects are expensive, but eliminating defects is also expensive”. • “However, most defects end up costing more than it would have cost to prevent them."
The Testing TrendsForwards • Test-Driven Development • Design the Test • Then Write the Code
The Testing TrendsBackwards - Circular • Linking • Help-Desk • Test • Story Board • Task • Unit • Programmer
The Ultimate Goal of Software Testing • To find the bugs before your users do! • UI Testing is END USER TESTING • OR TOTAL SYSTEM TESTING • OR INFRASTRUCTURE TESTING
Testers Multiple Roles • Guarantee SOFTWARE QUALITY • Regression Test each Version or build • Test all Environments • Provide Developers with all the information required: • To REPRODUCE THE “BUG” • Trace the steps to get the BUG • Screen shots, IntelliTrace, Logs and Stack Traces • NO-REPRO must be ELIMINATED
Tiers of Software Testing • Clear Separation of Functions • Clear Definition of Communication and Collaboration • TEAM of Software Quality
2)Walkthrough steps from beginning-to-end • Lesson 1 Manual Testing • Using Microsoft Test Manger to create and manage Test Plans • Running Test Cases and Publishing Results • Conducting Exploratory Testing • Fast Forward for Manual Testing • Lesson 2 Coded User Interface Testing • Automated Functional Tests – Using CUIT • Create a CUIT from Scratch • Create a CUIT from action recording • Making CUIT more Robust and Flexible
Building an AppFor Manual Testing • Demo of Simple Calculator
Automating the Calculator • Demo
Adding Data • Demo
Introducing an Error • Demo
Lab 1 • The Calculator
Microsoft Test Manager • Provides a single environment to author and manage Tests
Quick Start Guide for Manual Testing using Microsoft Test Manager • http://msdn.microsoft.com/en-us/library/dd380763.aspx
Easily reproducing issues through manual testing • Introducing Managed Exploratory Testing • The 5 Minute “elevator” Video • http://channel9.msdn.com/Series/Visual-Studio-2012-Premium-and-Ultimate-Overview/Visual-Studio-Ultimate-2012-Easily-reproducing-issues-through-manual-testing
6 Data Driven Tests • Any Files Used in The Tests • Example XML to load Variable and Expected Data • Could be: • SQL • Business Connectivity Services • SharePoint Lists • SQL Reports • Excel / PowerPivot • SSAS
4) Creating a coded UI test Using Coded UI Test Builder • Test Types • Microsoft Test Manager • Exploratory Testing • Easily reproducing issues through manual testing
Authoring a TEST case • Demo • Lab
Microsoft Test Manager • The first time you run MTM it will prompt • Add Team Foundation Manager • “If you don’t know the Name contact your administrator” • It might require “ServerName:Port Number”
Connecting Microsoft Test Manager to TFS • MTM is always connected to TFS
Story Boards • A user story can be stated as simply as • As an Employee I want to have an efficient way to manage my expenses. • The conversation around this statement between the product owner and the development team can raise questions such as: • Who can submit expense reports? • What states can an expense report be in? • When is it possible to change or remove an expense report? • What data is required in an expense report to register it correctly? • Where are the expense reports stored? For how long?
Adding Detail to User Stories • An expense report has the following state model: • New when created • Pending after submitted for approval • Approved • Rejected
Story Boards are Vital to Testing • Allows the Tester to Verify what should happen • If this does not Happen • See the Tasks that were assigned to this requirement • See the Programmers assigned to Each Task • Notify the Developer(s) • Provide the necessary info to avoid “NO REPRO” • Add this Test to the “Suite”
Test Plan Properties Figure 21-5. Test plan properties
Test Suites • Static suite: The content of this suite is manually added test cases. • Query-based suite: A query-based suite lists all test cases matching a given work item filter. • Requirements-based suite: This suite shows the test cases associated with a selected TFS requirement.