Jan 11, 2016
Florida International University03/11/2009
Contact: [email protected] [email protected]
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.
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
Agenda
Overview– Ultimate Software background, product,
environment– Development Team and Agile Development
methodologies we use
Swat/Fitnesse– Presentation and Labs
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
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
Our Best Reference is Our Customers
Electric Works
Ultimate Software Confidential – Internal Use ONLY – Not for Public Distribution
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.”
Top on “Best Companies to Work For” list Medium-Sized Companies, #3 in ’06 & ‘07
We made # 1 in 2008
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
Agile Methods We’re Using
Scrum Test-Driven Development
– Write the Automated test before writing code
Continuous Integration– Constant Builds
Pair Programming & Promiscuous Pairing
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
Functional Test Automation
Finds bugs in the functionality Tools
– SWAT – Simple Web Automation Toolkit
– WinRunner
– Fitnesse
– MBUnit
Automation at Ultimate Software
Currently we have 700+ pages 5.7 million lines of code 89% test automation average
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
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?
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
Fitnesse (con’t)
From this:
Fitnesse (con’t)
Results– Green
• Passed– Red
• Failed
Starting Fitnesse
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
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
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
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
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
Questions About Fitnesse
Questions???
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
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
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
SWAT Documentation
SourceForge– http://ulti-swat.wiki.sourceforge.net/
SWAT Demo
Demo…
Creating SWAT Tests in Fitnesse
What to Import– SWAT– SWAT.Fitnesse
Example!|Import|
|SWAT|
|SWAT.Fitnesse|
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|
Where We Are Now
!|Import|
|SWAT|
|SWAT.Fitnesse|
!|InternetExplorerSWATFixture|
How Commands Are Entered
All test blocks start with !|SWATFixture| Commands come underneath Example:
!|SWATFixture|
|OpenBrowser|
|NavigateBrowser|www.google.com|
Navigation
Open Browser– |OpenBrowser|
Navigate Browser• |NavigateBrowser|url|
– Example• |NavigateBrowser|www.google.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|
Where We Are Now
!|Import|
|SWAT|
|SWAT.Fitnesse|
!|InternetExplorerSWATFixture|
!|SWATFixture|
|OpenBrowser|
|NavigateBrowser|www.google.com|
|CloseBrowser|
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
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
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)
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|
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
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>
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
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|
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 (
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
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
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
Where to Get Help
Questions– Open forum on sourceforge
Websites– http://ulti-swat.wiki.sourceforge.net/