florida international university 03/11/2009 contact: [email protected]...

53
Florida International University 03/11/2009 Contact: [email protected] [email protected]

Upload: randolph-pope

Post on 11-Jan-2016

215 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Florida International University 03/11/2009 Contact: Greg_Miller@UltimateSoftware.com Michael_Longin@UltimateSoftware.com

Florida International University03/11/2009

Contact: [email protected] [email protected]

Page 2: Florida International University 03/11/2009 Contact: Greg_Miller@UltimateSoftware.com Michael_Longin@UltimateSoftware.com

Ultimate Software: Mission Statement

Our strategy is to provide US and Canada businesses with 200 or more employees, the highest quality and most complete unified global human capital management solution.

Page 3: Florida International University 03/11/2009 Contact: Greg_Miller@UltimateSoftware.com Michael_Longin@UltimateSoftware.com

Today’s Attendees from Ultimate Software

Greg Miller – Engineering Talent Manager Michael Longin – Software Engineer/Scrum

Master/Product Owner Jean Rodriguez – Software Engineer Intern Analia Ibargoyen – Software Engineer Intern Gunther Taborga – Software Engineer Intern

Page 4: Florida International University 03/11/2009 Contact: Greg_Miller@UltimateSoftware.com Michael_Longin@UltimateSoftware.com

Agenda

Overview– Ultimate Software background, product,

environment– Development Team and Agile Development

methodologies we use

Swat/Fitnesse– Presentation and Labs

Page 5: Florida International University 03/11/2009 Contact: Greg_Miller@UltimateSoftware.com Michael_Longin@UltimateSoftware.com

Ultimate Software – Who Are We?

Founded in 1990 to provide the highest quality integrated HR, benefits and payroll solution

Dedicated focus on HR/payroll & strategic talent management solutions, developed by actual HR/payroll practitioners

Award-winning UltiPro® product and customer services

880+ employees -- with headquarters in Weston, FL

Page 6: Florida International University 03/11/2009 Contact: Greg_Miller@UltimateSoftware.com Michael_Longin@UltimateSoftware.com

Quality product – Reputation for quality Great service – 99% Intersourcing® customer retention rate

HRMS/Payroll– The Core of What We Do.Since 1990

>1,500 Customers, > 3,000,000 Employees

Creating Desire

Execution Long-tenured development team Long-tenured implementation team Long-tenured sales team

Opportunity Companies with > 200 employees

Page 7: Florida International University 03/11/2009 Contact: Greg_Miller@UltimateSoftware.com Michael_Longin@UltimateSoftware.com

Our Best Reference is Our Customers

Electric Works

Ultimate Software Confidential – Internal Use ONLY – Not for Public Distribution

Page 8: Florida International University 03/11/2009 Contact: Greg_Miller@UltimateSoftware.com Michael_Longin@UltimateSoftware.com

Forrester Research’s Wave Rankings, Q4 2008

Source: Forrester (October 2008)

“Ultimate Software leads the pack. Ultimate Software’s well-rounded HRMS solution has strong core transactional capabilities, including payroll, as well as good flexibility and usability.”

Page 9: Florida International University 03/11/2009 Contact: Greg_Miller@UltimateSoftware.com Michael_Longin@UltimateSoftware.com

Top on “Best Companies to Work For” list Medium-Sized Companies, #3 in ’06 & ‘07

Page 10: Florida International University 03/11/2009 Contact: Greg_Miller@UltimateSoftware.com Michael_Longin@UltimateSoftware.com

We made # 1 in 2008

Page 11: Florida International University 03/11/2009 Contact: Greg_Miller@UltimateSoftware.com Michael_Longin@UltimateSoftware.com

Our Development Team

WINNER Stevie Award – Best Product Development Organization – Given by the American Business Awards in 2008

Spend $30+ million dollars per year in R & D Using the latest Processes & Technology

– Microsoft Partner– Agile Development– Net 3.0 in the earliest stages of beta– SQL Server 2005– Ajax/Atlas, Silverlight

Page 12: Florida International University 03/11/2009 Contact: Greg_Miller@UltimateSoftware.com Michael_Longin@UltimateSoftware.com

Agile Methods We’re Using

Scrum Test-Driven Development

– Write the Automated test before writing code

Continuous Integration– Constant Builds

Pair Programming & Promiscuous Pairing

Page 13: Florida International University 03/11/2009 Contact: Greg_Miller@UltimateSoftware.com Michael_Longin@UltimateSoftware.com

Scrum Characteristics

One of the agile processes Self-organizing teams Cross-functional teams of 5-8 people

– QA and Programmers on the same team

Product progresses in a series of two week sprints

Requirements are captured as items in a list of product backlog

Page 14: Florida International University 03/11/2009 Contact: Greg_Miller@UltimateSoftware.com Michael_Longin@UltimateSoftware.com

Functional Test Automation

Finds bugs in the functionality Tools

– SWAT – Simple Web Automation Toolkit

– WinRunner

– Fitnesse

– MBUnit

Page 15: Florida International University 03/11/2009 Contact: Greg_Miller@UltimateSoftware.com Michael_Longin@UltimateSoftware.com

Automation at Ultimate Software

Currently we have 700+ pages 5.7 million lines of code 89% test automation average

Page 16: Florida International University 03/11/2009 Contact: Greg_Miller@UltimateSoftware.com Michael_Longin@UltimateSoftware.com

Goals For This Session

Show attendees how to create automated UI tests for web applications running in IE and Firefox– Using SWAT and Fitnesse

Demonstrate new ways to apply automation techniques in the classroom

Page 17: Florida International University 03/11/2009 Contact: Greg_Miller@UltimateSoftware.com Michael_Longin@UltimateSoftware.com

Syllabus

Introduction to Fitnesse Why We Test the UI Introduction to SWAT How Commands Are Created Instantiating a Browser Navigating a Browser Bread and Butter Commands Expressions The SWAT Editor Questions?

Page 18: Florida International University 03/11/2009 Contact: Greg_Miller@UltimateSoftware.com Michael_Longin@UltimateSoftware.com

Fitnesse

FitNesse is a lightweight, open-source framework that makes it easy for software teams to:– Collaboratively define Acceptance Tests (web pages containing

simple tables of inputs and expected outputs)– Run those tests and see the results

www.fitnesse.org On your machines located at

– Localhost:8080

To install– Fitnesse.org– Swat installation guides located at SourceForge

Page 19: Florida International University 03/11/2009 Contact: Greg_Miller@UltimateSoftware.com Michael_Longin@UltimateSoftware.com

Fitnesse (con’t)

From this:

Page 20: Florida International University 03/11/2009 Contact: Greg_Miller@UltimateSoftware.com Michael_Longin@UltimateSoftware.com

Fitnesse (con’t)

Results– Green

• Passed– Red

• Failed

Page 21: Florida International University 03/11/2009 Contact: Greg_Miller@UltimateSoftware.com Michael_Longin@UltimateSoftware.com

Starting Fitnesse

Page 22: Florida International University 03/11/2009 Contact: Greg_Miller@UltimateSoftware.com Michael_Longin@UltimateSoftware.com

Fitnesse – Creating a Test

Creating a test– ^Filename

• Typing that into a fitnesse page will create a link• Clicking that link will create a new test page

Page 23: Florida International University 03/11/2009 Contact: Greg_Miller@UltimateSoftware.com Michael_Longin@UltimateSoftware.com

Fitnesse – Editing/Running Tests

Editing/Running– Suite

• Run multiple tests– Test

• Run a single test– Edit

• Edit a single test– Properties

• Turn on test and suite abilities

Page 24: Florida International University 03/11/2009 Contact: Greg_Miller@UltimateSoftware.com Michael_Longin@UltimateSoftware.com

Fitnesse Syntax

Syntax– Pipe Syntax

• Tests are written with commands contained within pipes ‘|’– {{{ }}}

• We use this to comment out sections of tests• NOTE – slows the tests down

– ‘’’Bold’’’– |!comment|

• Marks a table as a comment block– !contents –R

• Lists all the tests underneath the current folder– #

• Comments out a single line– !3

• Creates a bold headline– !*** Section ***!

• Creates a collapsible section– Images

• Add the url/link image will automatically be added• !img url-to-image-file

Page 25: Florida International University 03/11/2009 Contact: Greg_Miller@UltimateSoftware.com Michael_Longin@UltimateSoftware.com

Fitnesse for Acceptance Testing

Import statement– Import the needed namespaces

Testing table– First line is the class name– Second line

• Input variables and methods– Input1 and 2– Add/Subtract

– Third line and after• Actual Inputs and results

– 1+1 = 2– 1-1 = 0

Page 26: Florida International University 03/11/2009 Contact: Greg_Miller@UltimateSoftware.com Michael_Longin@UltimateSoftware.com

Fitnesse in the Classroom

Allow you as professors to provide students with the testing key when handing out projects

Teach students to automate their work without the need of manually working a UI

Automate testing of SQL code in a database course

Page 27: Florida International University 03/11/2009 Contact: Greg_Miller@UltimateSoftware.com Michael_Longin@UltimateSoftware.com

Questions About Fitnesse

Questions???

Page 28: Florida International University 03/11/2009 Contact: Greg_Miller@UltimateSoftware.com Michael_Longin@UltimateSoftware.com

Why We Do UI Testing

All the way through– Through the product– Through the layers– It’s truly how the user will use your system– 100% Functional

Page 29: Florida International University 03/11/2009 Contact: Greg_Miller@UltimateSoftware.com Michael_Longin@UltimateSoftware.com

Tools for Viewing HTML

IE– IE Developer Toolbar

Firefox– Firebug

Can find other tools via Google These tools read the real time HTML of the page

– Viewing the page source via a browser only provides the source at creation

Page 30: Florida International University 03/11/2009 Contact: Greg_Miller@UltimateSoftware.com Michael_Longin@UltimateSoftware.com

SWAT

SWAT– Simple Web Automation Toolkit– Meant to provide a simple way to test the UI of a website

C# Library– Not tied to the included editor or fitnesse (we just use these to

launch SWAT) Library of commands

– UI– Database

Open Source– Anyone can download the program and the source– MbUnit and Fitnesse can be used to run SWAT, though we use

Fitnesse internally

Page 31: Florida International University 03/11/2009 Contact: Greg_Miller@UltimateSoftware.com Michael_Longin@UltimateSoftware.com

SWAT Documentation

SourceForge– http://ulti-swat.wiki.sourceforge.net/

Page 32: Florida International University 03/11/2009 Contact: Greg_Miller@UltimateSoftware.com Michael_Longin@UltimateSoftware.com

SWAT Demo

Demo…

Page 33: Florida International University 03/11/2009 Contact: Greg_Miller@UltimateSoftware.com Michael_Longin@UltimateSoftware.com

Creating SWAT Tests in Fitnesse

What to Import– SWAT– SWAT.Fitnesse

Example!|Import|

|SWAT|

|SWAT.Fitnesse|

Page 34: Florida International University 03/11/2009 Contact: Greg_Miller@UltimateSoftware.com Michael_Longin@UltimateSoftware.com

Instantiating a Browser

SWAT currently supports 2 browsers– IE– Firefox

Test determines what browser it’s testing against from one of these lines written below the import statement– !|InternetExplorerSWATFixture|– !|FireFoxSWATFixture|

Page 35: Florida International University 03/11/2009 Contact: Greg_Miller@UltimateSoftware.com Michael_Longin@UltimateSoftware.com

Where We Are Now

!|Import|

|SWAT|

|SWAT.Fitnesse|

!|InternetExplorerSWATFixture|

Page 36: Florida International University 03/11/2009 Contact: Greg_Miller@UltimateSoftware.com Michael_Longin@UltimateSoftware.com

How Commands Are Entered

All test blocks start with !|SWATFixture| Commands come underneath Example:

!|SWATFixture|

|OpenBrowser|

|NavigateBrowser|www.google.com|

Page 37: Florida International University 03/11/2009 Contact: Greg_Miller@UltimateSoftware.com Michael_Longin@UltimateSoftware.com

Navigation

Open Browser– |OpenBrowser|

Navigate Browser• |NavigateBrowser|url|

– Example• |NavigateBrowser|www.google.com|

Page 38: Florida International University 03/11/2009 Contact: Greg_Miller@UltimateSoftware.com Michael_Longin@UltimateSoftware.com

Navigation (con’t)

Attach to Window– Used to attach to an open

browser or popup– Does not need to be exact– |AttachToWindow|WindowTitle|

Close Browser– |CloseBrowser|

Page 39: Florida International University 03/11/2009 Contact: Greg_Miller@UltimateSoftware.com Michael_Longin@UltimateSoftware.com

Where We Are Now

!|Import|

|SWAT|

|SWAT.Fitnesse|

!|InternetExplorerSWATFixture|

!|SWATFixture|

|OpenBrowser|

|NavigateBrowser|www.google.com|

|CloseBrowser|

Page 40: Florida International University 03/11/2009 Contact: Greg_Miller@UltimateSoftware.com Michael_Longin@UltimateSoftware.com

Lab 1 – Open a Browser and Go to Google

Goal: Be able to open a browser and navigate to a particular site

Specific objectives– Create a new test in fitnesse– Create an instance of the Internet Explorer browser– Navigate to www.google.com

Page 41: Florida International University 03/11/2009 Contact: Greg_Miller@UltimateSoftware.com Michael_Longin@UltimateSoftware.com

Bread and Butter

Setting the value of an attribute– SetElementAttribute

• Could be used to set a textbox• |SetElementAttribute|IdentifierType|identifier|attributeName|attributeValue|tagName(optional)|

– Identifier Type• http://ulti-swat.wiki.sourceforge.net/QS_Fitnesse_IdentifierTypes • ID• Name• InnerHTML• Expression (we will get to this one in a moment)

– Identifier• Example <label id=“myID”>my label</label>• |id|myID|• |InnerHTML|my label|

– NOTE* when using an identifier other than Expression must be exact– Attribute

• The Attribute that will be set• Could be value,class,style

– Attribute Value• Whatever you want to set it to

– Tagname• Optional• Speeds up tests• Recommended

Page 42: Florida International University 03/11/2009 Contact: Greg_Miller@UltimateSoftware.com Michael_Longin@UltimateSoftware.com

Bread and Butter (con’t)

StimulateElement– Could be used to click a button or change a drop down– |StimulateElement|IdentifierType|identifier|eventName|

tagName(optional)| – EventName

• OnClick • OnChange

AssertElementExists– Used to determine if an element is on the page– |AssertElementExists|IdentifierType|identifier| tagName(optional)

Page 43: Florida International University 03/11/2009 Contact: Greg_Miller@UltimateSoftware.com Michael_Longin@UltimateSoftware.com

Where We Are Now

!|Import||SWAT||SWAT.Fitnesse|

!|InternetExplorerSWATFixture|

!|SWATFixture||OpenBrowser||NavigateBrowser|www.google.com|

!|SWATFixture||SetElementAttribute|name|q|value|Ultimate Software|input||StimulateElement|name|btnG|onclick|input|

Page 44: Florida International University 03/11/2009 Contact: Greg_Miller@UltimateSoftware.com Michael_Longin@UltimateSoftware.com

Expressions

Allow more powerful searches Uses regular expressions

– Dev can help http://ulti-swat.wiki.sourceforge.net/QS_Fitnesse_IdentifierTypes Can string together multiple attributes Syntax

– ‘:’ vs ‘=’• ‘:’ means contains• ‘=’ means exact

– ‘;’ used to break up attributes• Example

– <label id=“myId”>my label</label>– Expression|id=myID;innerHTML:my lab|

NOTE– Period ‘.’ is a wild card, can mean anything

Page 45: Florida International University 03/11/2009 Contact: Greg_Miller@UltimateSoftware.com Michael_Longin@UltimateSoftware.com

Expressions (con’t)

Matchcount– Checks for multiple instances of an attribute– Example:

• innerHTML#2:ulti • Reads as, “ulti” must be contained twice in the

HTML ParentElement

– Can use the parent element– Example:

• parentElement.id:pid;class:hide• <tr id=“pid”><td class=“hide”></td></tr>

Page 46: Florida International University 03/11/2009 Contact: Greg_Miller@UltimateSoftware.com Michael_Longin@UltimateSoftware.com

Expression (con’t)

Styles– Slightly different syntax– style:border: 2px solid #000000; background-color:

#ffffff• Notice style is called, and then individual styles are

found

Page 47: Florida International University 03/11/2009 Contact: Greg_Miller@UltimateSoftware.com Michael_Longin@UltimateSoftware.com

Where We Are Now

!|Import||SWAT||SWAT.Fitnesse|

!|InternetExplorerSWATFixture|

!|SWATFixture||OpenBrowser||NavigateBrowser|www.google.com|

!|SWATFixture||SetElementAttribute|name|q|value|Ultimate Software|input||StimulateElement|name|btnG|onclick|input| |AssertElementExists|Expression|href:UltimateSoftware|A|

Page 48: Florida International University 03/11/2009 Contact: Greg_Miller@UltimateSoftware.com Michael_Longin@UltimateSoftware.com

Lab 2 – Searching in Google

Goal: Be able to use basic SWAT commands Specific

– Use Firebug to identify the names of the Google textbox and search button

– Set the search term to “Workshop on Integrating Software Testing”

– Press the Search button– Click on an anchor tag that includes ‘fiu’ in the href

and ‘Software Testing’ in the Text– Ensure that Peter Clarke’s email address is present (

[email protected])

Page 49: Florida International University 03/11/2009 Contact: Greg_Miller@UltimateSoftware.com Michael_Longin@UltimateSoftware.com

SWAT in the Classroom

Allow you as professors to provide students with the testing key when handing out projects

Testing Web Applications in a web programming course

SWAT is open source, we would be happy to work with a professor on creating programming projects from the base source code

Page 50: Florida International University 03/11/2009 Contact: Greg_Miller@UltimateSoftware.com Michael_Longin@UltimateSoftware.com

The SWAT Editor

Included in SWAT download from sourceforge Up to date walk-throughs here:

– http://ulti-swat.wiki.sourceforge.net/QS_SwatEditor

Tests can be run/written in the editor SQL checks can also be created here UI recorder is contained in the editor

Page 51: Florida International University 03/11/2009 Contact: Greg_Miller@UltimateSoftware.com Michael_Longin@UltimateSoftware.com

Final Words

Additional Remarks– When testing in IE, run fitnesse in Firefox and vice

versa– The SWAT Editor recorder is meant to help, not to do

all the work

Page 52: Florida International University 03/11/2009 Contact: Greg_Miller@UltimateSoftware.com Michael_Longin@UltimateSoftware.com

Where to Get Help

Questions– Open forum on sourceforge

Websites– http://ulti-swat.wiki.sourceforge.net/