1 / 162

Automating Coded UI Testing using Microsoft Testing Tools in Visual Studio 2012

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

nadda
Télécharger la présentation

Automating Coded UI Testing using Microsoft Testing Tools in Visual Studio 2012

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Automating Coded UI Testing using Microsoft Testing Tools in Visual Studio 2012 Clive G Hermann

  2. Introductions • Name • Title/Function • Job Responsibility • Testing Experience • C# Experience • Expectations for the Course

  3. Course Materials

  4. 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

  5. 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

  6. 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

  7. Overview of Automated Code UI Testing

  8. Reality of Automated Testing • 70% of all Testing is manual

  9. 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

  10. 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

  11. IT Has a Problem

  12. 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."

  13. The Testing TrendsForwards • Test-Driven Development • Design the Test • Then Write the Code

  14. The Testing TrendsBackwards - Circular • Linking • Help-Desk • Test • Story Board • Task • Unit • Programmer

  15. 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

  16. Manual to Coded UI

  17. 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

  18. Tiers of Software Testing • Clear Separation of Functions • Clear Definition of Communication and Collaboration • TEAM of Software Quality

  19. 2)Walkthrough steps from beginning-to-end

  20. 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

  21. A manual testing process

  22. Building an AppFor Manual Testing • Demo of Simple Calculator

  23. Automating the Calculator • Demo

  24. Adding Data • Demo

  25. Introducing an Error • Demo

  26. Lab 1 • The Calculator

  27. 3 Creating Manual Tests

  28. Visual Studio 2012Supported Test Types

  29. Microsoft Test Manager • Provides a single environment to author and manage Tests

  30. Quick Start Guide for Manual Testing using Microsoft Test Manager • http://msdn.microsoft.com/en-us/library/dd380763.aspx

  31. 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

  32. 6 Data DrivenTests

  33. 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

  34. DEMO and Lab

  35. 4) Creating a coded UI test Using Coded UI Test Builder

  36. 4) Creating a coded UI test Using Coded UI Test Builder • Test Types • Microsoft Test Manager • Exploratory Testing • Easily reproducing issues through manual testing

  37. Authoring a TEST case • Demo • Lab

  38. 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”

  39. TFS and MTM

  40. Connecting Microsoft Test Manager to TFS • MTM is always connected to TFS

  41. 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?

  42. Adding Detail to User Stories • An expense report has the following state model: • New when created • Pending after submitted for approval • Approved • Rejected

  43. 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”

  44. Test Plan Properties Figure 21-5. Test plan properties

  45. 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.

More Related