Applying Modern Software Development Techniques to Automating the Web UI.

Slides:



Advertisements
Similar presentations
1 19-Jan-14 © Copyright: City Boy Salary : Simon Powers : 2014 Brown Bag – Behaviour Driven Development with Specflow Brown Bag – Behaviour Driven Development.
Advertisements

An Effective Agile Testing Framework AN AGILE TESTING FRAMEWORK
FitNesse in Fifty Minutes Chris Harbert Resonate 1.
11 Introduction to UI testing with SWAT 2/12/2011.
Acceptance Testing.
Pages and boxes Building quick user interfaces. learning objectives o Build a quick UI with pages and boxes o understand how pages and boxes work o click.
Web Services Darshan R. Kapadia Gregor von Laszewski 1http://grid.rit.edu.
Key-word Driven Automation Framework Shiva Kumar Soumya Dalvi May 25, 2007.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 17 Slide 1 Rapid software development.
Alternate Software Development Methodologies
Test Driven Development: An Emerging Solution for Software Development.
Quality Assurance CS 615. Mission Statement The Quality Assurance team will provide assurance to stakeholders in CS-615/616 projects that their projects.
Outline IS400: Development of Business Applications on the Internet Fall 2004 Instructor: Dr. Boris Jukic Table, Forms, Metatags and Frames.
Senior Design – Acceptance Test Plan Review The goal is to: define the criteria for approving the application. Tightly coupled to the Requirements document.
 What is Software Testing  Terminologies used in Software testing  Types of Testing  What is Manual Testing  Types of Manual Testing  Process that.
Agile Testing with Testing Anywhere The road to automation need not be long.
Living Requirements using Behavior Driven Development
Software Reengineering 2003 년 12 월 2 일 최창익, 고광 원.
The Project AH Computing. Functional Requirements  What the product must do!  Examples attractive welcome screen all options available as clickable.
Automation using Selenium Authored & Presented by : Chinmay Sathe & Amit Prabhu Cybage Software Pvt. Ltd.
2. Introduction to the Visual Studio.NET IDE 2. Introduction to the Visual Studio.NET IDE Ch2 – Deitel’s Book.
Review of last Session Adding custom html Adding custom html HTML is the language that web servers understand, all web pages are created using HTML. HTML.
VoiceXML Builder Arturo Ramirez ACS 494 Master’s Graduate Project May 04, 2001.
Joel Bapaga on Web Design Strategies Technologies Commercial Value.
Database testing Prepared by Saurabh sinha. Database testing mainly focus on: Data integrity test Data integrity test Stored procedures test Stored procedures.
Florida International University 03/11/2009 Contact:
About Dynamic Sites (Front End / Back End Implementations) by Janssen & Associates Affordable Website Solutions for Individuals and Small Businesses.
Software Engineering CSCI 201L Jeffrey Miller, Ph.D. HTTP :// WWW - SCF. USC. EDU /~ CSCI 201 USC CSCI 201L.
Sri Lanka Institute of Information Technology Software Engineering Project – I Clone of Rally GROUP NO : WD-SEP-002 | PROJECT NO :25 PROJECT : CLONE OF.
EXtreme Programming: An Introduction Presentation by: Jon Banta.
You Can Make A Wiki, Too A guide to creating a wiki of your own.
C# Tutorial -1 ASP.NET Web Application with Visual Studio 2005.
Exploring an Open Source Automation Framework Implementation.
Rapid software development 1. Topics covered Agile methods Extreme programming Rapid application development Software prototyping 2.
Software Construction Lecture 18 Software Testing.
Process Presentation Kin Wan Li, Ashley Zoch, Mevesh Gopee, Damian Ridgwell, Edwin Lusala,
Sample School Website. What is wrong with the existing School Webspace Site? Can only host static pages – no dynamic content possible. Can not be edited.
Goals for Presentation Explain the basics of software development methodologies Explain basic XP elements Show the structure of an XP project Give a few.
1 Presentation Title Test-driven development (TDD) Overview David Wu.
The Data Liberation Initiative Training University of Regina December 2, 1999 _______________________ Statistics Canada / Statistique Canada.
© 2012 LogiGear Corporation. All Rights Reserved FitNesseFitNesse Authors: Nghia Pham 1.
Software Quality Assurance and Testing Fazal Rehman Shamil.
Unit 17: SDLC. Systems Development Life Cycle Five Major Phases Plus Documentation throughout Plus Evaluation…
1 The Software Development Process ► Systems analysis ► Systems design ► Implementation ► Testing ► Documentation ► Evaluation ► Maintenance.
HTML Tutorial. What is HTML HTML is a markup language for describing web documents (web pages) HTML documents are described by HTML tags Each HTML tag.
Live. learn. work. play Superior Avenue Suite 310 Cleveland Ohio Tel: Fax:
A S P. Outline  The introduction of ASP  Why we choose ASP  How ASP works  Basic syntax rule of ASP  ASP’S object model  Limitations of ASP  Summary.
Software Engineering Lecture 11 Software Testing Presenter: Josef Hallberg 1.
Testing under the Agile Method CSCI 521 Software Project Management based on the book Testing Extreme Programming by Lisa Crispin and Tip House.
ASP.NET 2.0 Mohammed Abdelhadi Developer.NET Evangelist Microsoft Corporation.
Arklio Studija 2007 File: / / Page 1 Automated web application testing using Selenium
Intro to WordPress (Using XAMPP)
TEST AUTOMATION IN BDD WAY
Selenium HP Web Test Tool Training
Selenium HP Web Test Tool Training
Software Testing.
GeneXus 9.0: Web applications at their higher power
Software Quality Assurance
Object oriented system development life cycle
Advantages OF BDD Testing
Selenium HP Web Test Tool Training
TDD adoption plan 11/20/2018.
CIS16 Application Development – Programming with Visual Basic
Web UI testing automation and Selenium
Teaching slides Chapter 6.
Unemployment Insurance Agency Michigan Web Account Manager
Selenium Tutorials Cheyat Training.
Open Source Tool Based Automation solution with Continuous Integration and end to end BDD Implementation Arun Krishnan - Automation Manager Maria Afzal-
Test Cases, Test Suites and Test Case management systems
Open Source Tool Based Automation solution with Continuous Integration and end to end BDD Implementation Arun Krishnan - Automation Manager Maria Afzal-
Presentation transcript:

Applying Modern Software Development Techniques to Automating the Web UI

Ultimate Software: Mission Statement To provide United States and Canadian businesses with 200 or more employees the highest quality, most complete, and well-integrated suite of strategic human resources, payroll, and talent management solutions.

Who we Are Michael Longin – Ultimate Software Software Engineer Certified Scrum Master Project Lead - SWAT Christopher Taylor – Ultimate Software Lead Process Engineer Software Test Engineer Certified Scrum Master

Goals For This Session  Attendees will gain a better understanding of how to apply modern software development techniques for UI testing in an effort to create more agile and resilient tests, as well as improve overall quality.  “Automated testing done right is Software Development” –Elfriede Dustin and Marcus GTAC 2008

Tools You Will See Today  SWAT –Simple Web Automation Toolkit –C# library for writing tests against a web UI –  Fitnesse –Wiki based requirements test tool – Both are open source and can be used either together or stand alone

Outline  What is wrong with the record\playback technique  Applying Acceptance Test Driven Design  Refactoring  Pair testing  Comparing new methods to record\playback

Record-Playback Technique Weaknesses  Brittle »Easily broken when features change, even when the feature is not part of the test  Very hard to update without re-recording  Not Agile »Can only be done when code is complete  Only tests what you record and not what you expect  Requires cleanup post recording  Time consuming  Hard to read and understand

Acceptance Test Driven Design  A way of writing software where the test is written before coding has commenced  Not just for testing below the UI  A passing test demonstrates satisfaction of requirements  Allows both positive and negative test case scenarios

ATDD as part of UI development  Test defines the user experience  Programmers can code the user interface to a prewritten test  Automated tests are written alongside the test cases and coding effort  Turns vertical slicing into completed automation

How to use ATDD with the UI  Starts with well written conditions of satisfaction  Automation script is developed alongside test case creation  Consistent naming standards are key* txb -> Textbox btn -> Button lbl -> Label *if naming is wrong, can be easily updated  Once test is complete, developer can start running the test against code  Once test runs green, the story is complete

User Story #1 : Login  As a user I want to provide my username and password to login  Conditions of Satisfaction Login and password boxes are present Title should read “M&C Life Insurance” Valid login should lead to homepage Example login: ctaylor/password Homepage should read “Welcome”

User Story #1: Prototype

Applying ATDD continued  Example User Story #1 –Title should read “M&C Life Insurance” Title means an H2 Text reads: “M&C Life Insurance” –Login and Password boxes are present Two text boxes Login - >txbLogin Password -> txbPassword Login button -> btnLogin

Demonstration of Code 14 Conditions of Satisfaction (Test underneath) -Test Setup (Open the browser and navigate) |OpenBrowser| |NavigateBrowser|MCInsurance.com| -Login and password boxes are present |AssertElementExists|id|txbLogin|INPUT| |AssertElementExists|id|txbPassword|INPUT|

Demonstration of Code (continued) Conditions of Satisfaction (Test underneath) -Title should read “M&C Life Insurance” |AssertElementExists|innerHTML| M&C Life Insurance |H2| -Valid Login should lead to homepage |SetElementAttribute|id|txbLogin|value|ctaylor|INPUT| |SetElementAttribute|id|txbPassword|value|password|INPUT| |StimulateElement|id|btnLogin|onclick|INPUT| |AssertElementExists|Expression|innerHTML:Welcome|H1| 15

Refactoring  Why refactor? –Less time to write automation –Less maintenance –Creates reusable code –Creates a domain specific language  What is refactoring? –For our purposes Turn frequently used blocks of code into single line reusable entities Use variables to make tests more robust Creates an easily readable test by using English named functions

Additional Benefits of Refactoring  Allows tests to be easily updated if core features change If login changed for example, only one update needed  Allows those beginning to write tests to take advantage of previously created work  Makes tests much easier to read and debug

User Story #2:View My Name  As a user, I want to be welcomed by my name after I login  Conditions of Satisfaction My first and last name are correct Title should read “Welcome ‘first name’ ‘last name’” o Example: “Welcome Chris Taylor”

User Story #2: Prototype

A Test Refactored  Example: |OpenBrowser| |NavigateBrowser|MCInsurance.com| |SetElementAttribute|id|txbLogin|value|ctaylor|INPUT| |SetElementAttribute|id|txbPassword|value|password|INPUT| |StimulateElement|id|btnLogin|onclick|INPUT| |AssertElementExists|Expression|innerHTML:Welcome Chris Taylor|H1|  Becomes: !define userName (ctaylor) !define password (password) !include.Macros.Login |AssertElementExists|Expression|innerHTML:Welcome Chris Taylor|H1| Example:

Pair Testing  Benefits rival those of Pair Programming – (Yes, we did in fact just site Wikipedia)  Can be very effective for both writing automation and locating missing requirements  Two heads are always better than one  While automating you can also accomplish exploratory testing  Can replace manual testing phase with the creation of automation

Recorded vs New Way (Recorded) 22 |OpenBrowser| |NavigateBrowser| |AssertElementExists|expression|innerHTML:M&amp.C Life Insurance|H1| |StimulateElement|Expression|innerHtml:.INPUT id=ctl00_ContentPlaceHolder1_login_textBoxLogin name=ctl00.ContentPlaceHolder1.login.textBoxLogin.|onclick|TD| |StimulateElement|Expression|innerHtml:.TABLE.[\r]+[\n]+.TBODY.[\r]+[\n]+.TR.[\r]+[\n]+.TD. User Name..TD.[\r]+[\n]+.TD..INPUT id=ctl00_ContentPlaceHolder1_login_textBoxLogin name=ctl00.ContentPlaceHolder1.login.textBoxLogin...TD...TR.[\r]+[\n]+.TR.[\r]+[\n]+.TD.Pas sword..TD.[\r]+[\n]+.TD..INPUT id=ctl00_ContentPlaceHolder1_login_txbPassword type=password value="" name=ctl00.ContentPlaceHolder1.login.txbPassword...TD...TR.[\r]+[\n]+.TR.[\r]+[\n]+.TD align=middle colSpan=2..INPUT id=ctl00_ContentPlaceHolder1_login_btnLogin type=submit value=Login name=ctl00.ContentPlaceHolder1.login.btnLogin...TD...TR...TBODY...TABLE.|onclick|DIV| |SetElementAttribute|id|ctl00_ContentPlaceHolder1_login_textBoxLogin|Value|ctaylor|INPUT| |SetElementAttribute|id|ctl00_ContentPlaceHolder1_login_txbPassword|Value|password|INP UT| |StimulateElement|Expression|id:ctl00_ContentPlaceHolder1_login_btnLogin|onclick|INPUT| |AssertElementExists|expression|innerHTML:Welcome Chris Taylor|H2|

Recorded vs New Way (New way) !define userName (ctaylor) !define password (password) !include.Macros.Login |AssertElementExists|Expression|innerHTML:Welcome Chris Taylor|H1| Login Macro |OpenBrowser| |NavigateBrowser| |SetElementAttribute|id|txbLogin|Value|${userName}|INPUT| |SetElementAttribute|id|txbPassword|Value|${password}|INPUT| |StimulateElement|Expression|id:btnLogin|onclick|INPUT|

Recorded vs New Way (An Example)  Recorded Unreadable Unorganized Not useable as documentation (concept of testable documentation)  New way Easily readable Robust Testable documentation

Where to Get Help  Questions –SWAT: –Fitnesse: ch=web&pub=groups&sec=group&slk=2 – –Blogs devXero.wordpress.com  Websites – –

Questions