1.59k likes | 1.91k 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
3) 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
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.
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.
Configuring Test Settings • Establish Environments • Diagnostic Connectors • Best Practice • Work with Development Teams • The Developers need to have the same tools to view the test data you collected for them • Microsoft released a “Test Attachment Cleaner” available at • “Aka.ms./TFPowerTools”
Using Builds • Scout • Installing Software and running some initial tests • After the SCOUT is successful it can become a “template for other Testers” • There is an available builds DROPDOWN • Click “ASSIGN TO PLAN” to add a new build to a plan
Analyzing Impacted Tests • Quickly identify tests that need to be run based on changes to code • Can Run in the background • “Track” menu => Recommended Tests • Does not recognize “DATA” changes • Does not recognize other library changes • Does not recognize other Application changes • Best Practice - Periodicaly run all Tests
Defining Multiple Test Configurations • Environments may differ: • IE 8,9,10 • Ipad Horizontal/Vertical • BYOD • HTML5 • ETC.
Test Cases are organized in to Suites • Requirements-Based test suite • Query-Based test suite • Static Test Suite • Status of tests in TEST SUITE • In planning • In Progress • Completed