SlideShare ist ein Scribd-Unternehmen logo
1 von 52
Cucumber
From the
Ground Up
Joseph E. Beale
02/17/2015
Who am I and why am I here?
Name: Joe Beale
What is essential to know about me:
 I am NOT brilliant.
What I hope to accomplish today:
 Prove that the bullet point above is
correct.
 Put to death any fear you might have
about writing test automation code.
Agenda
 Installation: 10:30 – 10:45
 Environment Set-up: 10:45 – 11:00
 Build and Test: 11:00 – 11:15
 Q&A + Fun Time: 11:15 – 11:30
Installation
Ruby Installer:
http://rubyinstaller.org/downloads/
Installation
MAKE SURE YOU CHECK THE THREE BOXES THAT
ARE RIGHT UNDER THE FOLDER SELECTION FIELD.
Installation
Download DevKit from the RubyInstaller page:
Extract to C:DevKit
Installation
At command prompt, check for correct
Ruby installation by typing:
 ruby –v [Enter]
Installation
To install DevKit, navigate to C:DevKit and
type the following:
 ruby dk.rb init [Enter]
 ruby dk.rb install [Enter]
Go back to the root directory (C:) and
install Cucumber by typing:
 gem install cucumber [Enter]
You now have Ruby and Cucumber fully installed!
Environment
Using Windows Explorer, create a new
folder on your C drive called test_project.
Environment
Inside of test_project, create a folder called
features, then inside of that create two
more: step_definitions and support.
Environment
RubyMine – A Robust IDE for Ruby Coding
RubyMine is also very Cucumber-friendly!
Environment
We will use RubyMine 5.4.3 for today’s
demo:
Environment
Use the Open Directory command to open
up our test_project folder.
Environment
Create a folder called env.rb inside of the
support folder using New –> File from the
right-click menu.
Environment
Need two more gems for this
demonstration:
 watir-webdriver
 rspec
Q: What is a Ruby gem?
A: A pre-built code module that performs
some useful function in Ruby, available for
free from https://rubygems.org/
Environment
Go back to your command prompt and
install the gems using this command:
 gem install <name of gem> [Enter]
Environment
Require statements tell Ruby that you are
going to use some extra code modules.
Q: Why env.rb in the support folder?
A: Cucumber knows to run env.rb before
anything else and looks for it in support.
Build and Test
Create a feature file and a test scenario.
Cucumber scenarios are written in ordinary
business language using Gherkin keywords
(“Feature:”, “Scenario:”, “Given”, “When”,
“Then”, “And”, “But”).
Build and Test
Create step definitions using RubyMine’s
built-in functionality.
Build and Test
RubyMine creates a new file called
my_steps.rb and adds code blocks with
regular expressions to match your Gherkin
steps.
Build and Test
First step:
Given I am on the Bing home page
To satisfy this step, we need to open a
browser and navigate to the Bing home
page.
How do we do this in Ruby?
Build and Test
Watir Webdriver is a gem that is built to drive
web applications. Since the code is
already written, we only need to learn how
to use it.
http://watirwebdriver.com/
Build and Test
Right on the front page is the code to
create a browser object (along with lots of
other stuff):
We will use these exact lines of code and
modify them slightly for our purposes.
Build and Test
The small ‘b’ in their examples stands for
‘browser’, but when we create an object
we will call it ‘browser’ to avoid confusion.
The browser object is created in env.rb so
that it is executed before any of the steps
Build and Test
Q: Why did you put a ‘$’ in front of your
object name?
A: To indicate that it’s a global variable.
We want the browser object to be
accessible to all steps, so we make it global.
Build and Test
In the first step definition, we will put the
next line of code, but modified to reflect
our global browser object and the URL for
Bing.com:
Now when we run our Cucumber scenario,
the first step will give us…
Build and Test
The Bing home page!
Build and Test
A quick word about method calls: the
format for calling a method in Ruby is
(object name) + dot (‘.’) + (method name).
So in the method call below, the object
name is ‘$browser’ and the method name is
‘goto’.
Build and Test
The ‘goto’ method is just one of the pre-defined
methods inside of the Watir::Browser class. The
method takes one argument: a URL (because it
needs to know where to “go to”).
Arguments can be passed either inside of
parentheses or alongside a method call. So in
the previous example, we could have said:
$browser.goto(‘http://bing.com’)
Build and Test
Second step:
When I search for "Death Star“
To satisfy this step, we need to interact with
two of the elements of the page:
 The search text field
 The search button (indicated by the
magnifying glass icon)
Build and Test
Watir Webdriver has several methods in the
Browser class to interact with the elements
that are common to most web pages. In
fact, the ones we need are also listed on
their front page:
Build and Test
To interact with the two search elements,
we will use the ‘text_field’ and ‘button’
methods. These methods each take one
argument: a location as indicated by the
syntax (:locater => ‘unique_identifier’). The
examples given are these:
b.text_field(:id => 'entry_0').set 'your name'
b.button(:name => 'submit').click
Build and Test
The locators are part of the html code for
the page elements, and this information is
acquired by using Firefox’s “Inspect
Element” tool.
So if you right-click on the search text field
and choose “Inspect Element” from the
drop-down menu, you will see the specific
html code for that element in the shaded
section.
Build and Test
The most common locator to use is ‘id’. So
we will copy the value ‘sb_form_q’ to use in
our argument to the ‘text_field’ method.
Build and Test
One nice feature of Ruby method calls is
the ability to “chain” your methods one
right after another. Ruby will execute them
in the order given, from left to right. That is
what you see in the the ‘text_field’
example:
b.text_field(:id => 'entry_0').set 'your name'
The ‘set’ method is executed right after the
‘text_field’ method.
Build and Test
You can use the ‘set’ method anytime you
have defined a text field element using the
‘text_field’ method. It takes one argument,
the word or phrase you wish to place in that
field. So, putting it all together, the code for
our second step will look like this:
Q: Where did ‘search_phrase’ come from?
Build and Test
As you may recall, our original step
definition looked like this:
I changed the default variable name ‘arg’
to one that reflects what it actually holds:
‘search_phrase’. The capture group with
wildcard grabs the phrase “Star Wars” from
the step and throws it into the variable.
Build and Test
Since the variable ‘search_phrase’ contains
a string, then it can be used as an
argument for the ‘set’ method. And so we
are then able to use that same Ruby code
block no matter what phrase is used in the
Gherkin step.
Step 
Step
Definition
Build and Test
Running the test now gives us…
That’s
No
Moon!!!
Build and Test
For the button element, we’ll do it exactly
like we did the text field, except instead of
the ‘set’ method, we’ll need to find one
that will click the button. The method name
in this case is – surprise! – ‘click’. Here’s the
example from Watir Webdriver’s front page:
b.button(:name => 'submit').click
Build and Test
The locator they are using is ‘name’, but in
our case there is no name, just a magnifying
glass symbol. So we’ll inspect the element
in order to find the ‘id’ for locating it:
Build and Test
Adding that into the step gives us this:
Again, you can see that we “chained” two
methods: first the ‘button’ method to locate
a specific element and then the
‘click’method. The latter method does not
require any arguments, for obvious reasons.
Build and Test
Now let’s run it again. Well, that’s better!
Build and Test
Third step:
Then the search results will
include "Star Wars“
Somehow we have to get our code to
examine the result page and check to see
if our result phrase “Star Wars” is found
anywhere. This is where the Rspec gem
comes into play.
Build and Test
You might recall that in the env.rb file we
told Ruby to require that code:
RSpec gives us the ability to “match” values
and phrases against an expected result.
Build and Test
For our purposes, the most relevant RSpec
method is ‘should’. This method will check
a value from our object against another
value and either pass or fail the step based
on whether or not it matches. Let’s see how
this step might be coded.
Q: What does the ‘text’ method do?
Build and Test
Many of the html elements on a web page will
have text associated with them, and most of
the time it’s displayed on the page.
For any given element, you can request the
associated text using the ‘text’ method. The
code we used, ‘$browser.text’ will give you all
the text on the page.
Build and Test
The ‘should’ method requires a “matcher”
like ‘include’ or ‘==‘ in order to compare
with the expected result. The ‘include’
matcher mimics the behavior of the Ruby
‘include?’ method that is part of the String
class.
If the expression matches the expected
value, then the test passes!
Build and Test
Running one more time gives us this result in
RubyMine:
Congratulations! You have just passed your
first Ruby/Cucumber automated test!
Q&A + Fun Time
You don’t have to be this guy to automate.
Q&A + Fun Time
In fact, even this guy could do it.
Q&A + Fun Time
Questions? Comments? Snark?
You can reach me at:
joseph_beale@att.net
or
joseph.beale92@gmail.com
or
Connect with me on Linked In!

Weitere ähnliche Inhalte

Was ist angesagt?

Refactoring page objects The Screenplay Pattern
Refactoring page objects   The Screenplay Pattern Refactoring page objects   The Screenplay Pattern
Refactoring page objects The Screenplay Pattern RiverGlide
 
Growing Manual Testers into Automators
Growing Manual Testers into AutomatorsGrowing Manual Testers into Automators
Growing Manual Testers into AutomatorsCamille Bell
 
Automate Debugging with git bisect
Automate Debugging with git bisectAutomate Debugging with git bisect
Automate Debugging with git bisectCamille Bell
 
TDD on Android (Øredev 2018)
TDD on Android (Øredev 2018)TDD on Android (Øredev 2018)
TDD on Android (Øredev 2018)Danny Preussler
 
So What Do Cucumbers Have To Do With Testing
So What Do Cucumbers Have To Do With TestingSo What Do Cucumbers Have To Do With Testing
So What Do Cucumbers Have To Do With Testingsjmarsh
 
Specification-by-Example: A Cucumber Implementation
Specification-by-Example: A Cucumber ImplementationSpecification-by-Example: A Cucumber Implementation
Specification-by-Example: A Cucumber ImplementationTechWell
 
From Good to Great: Functional and Acceptance Testing in WordPress.
From Good to Great: Functional and Acceptance Testing in WordPress.From Good to Great: Functional and Acceptance Testing in WordPress.
From Good to Great: Functional and Acceptance Testing in WordPress.David Aguilera
 
Behaviour Driven Development
Behaviour Driven DevelopmentBehaviour Driven Development
Behaviour Driven DevelopmentRichard Ruiter
 
@IndeedEng: Tokens and Millicents - technical challenges in launching Indeed...
@IndeedEng:  Tokens and Millicents - technical challenges in launching Indeed...@IndeedEng:  Tokens and Millicents - technical challenges in launching Indeed...
@IndeedEng: Tokens and Millicents - technical challenges in launching Indeed...indeedeng
 
Perl web programming
Perl web programmingPerl web programming
Perl web programmingJohnny Pork
 
ScreenPlay Design Patterns for QA Automation
ScreenPlay Design Patterns for QA AutomationScreenPlay Design Patterns for QA Automation
ScreenPlay Design Patterns for QA AutomationCOMAQA.BY
 
Google mock for dummies
Google mock for dummiesGoogle mock for dummies
Google mock for dummiesHarry Potter
 
Code Quality Practice and Tools
Code Quality Practice and ToolsCode Quality Practice and Tools
Code Quality Practice and ToolsBob Paulin
 
AngularJS Beginner Day One
AngularJS Beginner Day OneAngularJS Beginner Day One
AngularJS Beginner Day OneTroy Miles
 
TechSEO Boost 2018: Programming Basics for SEOs
TechSEO Boost 2018: Programming Basics for SEOsTechSEO Boost 2018: Programming Basics for SEOs
TechSEO Boost 2018: Programming Basics for SEOsCatalyst
 
Test Driven Development in AEM/CQ5
Test Driven Development in AEM/CQ5Test Driven Development in AEM/CQ5
Test Driven Development in AEM/CQ5rtpaem
 
Selenium and Cucumber Selenium Conf 2011
Selenium and Cucumber Selenium Conf 2011Selenium and Cucumber Selenium Conf 2011
Selenium and Cucumber Selenium Conf 2011dimakovalenko
 

Was ist angesagt? (18)

Refactoring page objects The Screenplay Pattern
Refactoring page objects   The Screenplay Pattern Refactoring page objects   The Screenplay Pattern
Refactoring page objects The Screenplay Pattern
 
Growing Manual Testers into Automators
Growing Manual Testers into AutomatorsGrowing Manual Testers into Automators
Growing Manual Testers into Automators
 
Automate Debugging with git bisect
Automate Debugging with git bisectAutomate Debugging with git bisect
Automate Debugging with git bisect
 
TDD on Android (Øredev 2018)
TDD on Android (Øredev 2018)TDD on Android (Øredev 2018)
TDD on Android (Øredev 2018)
 
So What Do Cucumbers Have To Do With Testing
So What Do Cucumbers Have To Do With TestingSo What Do Cucumbers Have To Do With Testing
So What Do Cucumbers Have To Do With Testing
 
Specification-by-Example: A Cucumber Implementation
Specification-by-Example: A Cucumber ImplementationSpecification-by-Example: A Cucumber Implementation
Specification-by-Example: A Cucumber Implementation
 
From Good to Great: Functional and Acceptance Testing in WordPress.
From Good to Great: Functional and Acceptance Testing in WordPress.From Good to Great: Functional and Acceptance Testing in WordPress.
From Good to Great: Functional and Acceptance Testing in WordPress.
 
Behaviour Driven Development
Behaviour Driven DevelopmentBehaviour Driven Development
Behaviour Driven Development
 
@IndeedEng: Tokens and Millicents - technical challenges in launching Indeed...
@IndeedEng:  Tokens and Millicents - technical challenges in launching Indeed...@IndeedEng:  Tokens and Millicents - technical challenges in launching Indeed...
@IndeedEng: Tokens and Millicents - technical challenges in launching Indeed...
 
Perl web programming
Perl web programmingPerl web programming
Perl web programming
 
ScreenPlay Design Patterns for QA Automation
ScreenPlay Design Patterns for QA AutomationScreenPlay Design Patterns for QA Automation
ScreenPlay Design Patterns for QA Automation
 
Automated tests
Automated testsAutomated tests
Automated tests
 
Google mock for dummies
Google mock for dummiesGoogle mock for dummies
Google mock for dummies
 
Code Quality Practice and Tools
Code Quality Practice and ToolsCode Quality Practice and Tools
Code Quality Practice and Tools
 
AngularJS Beginner Day One
AngularJS Beginner Day OneAngularJS Beginner Day One
AngularJS Beginner Day One
 
TechSEO Boost 2018: Programming Basics for SEOs
TechSEO Boost 2018: Programming Basics for SEOsTechSEO Boost 2018: Programming Basics for SEOs
TechSEO Boost 2018: Programming Basics for SEOs
 
Test Driven Development in AEM/CQ5
Test Driven Development in AEM/CQ5Test Driven Development in AEM/CQ5
Test Driven Development in AEM/CQ5
 
Selenium and Cucumber Selenium Conf 2011
Selenium and Cucumber Selenium Conf 2011Selenium and Cucumber Selenium Conf 2011
Selenium and Cucumber Selenium Conf 2011
 

Andere mochten auch

The Risky Business of Testing by Shaminder Rai and Dave Patel
The Risky Business of Testing by Shaminder Rai and Dave PatelThe Risky Business of Testing by Shaminder Rai and Dave Patel
The Risky Business of Testing by Shaminder Rai and Dave PatelQA or the Highway
 
Ready, set, go! - Anna Royzman
Ready, set, go! - Anna RoyzmanReady, set, go! - Anna Royzman
Ready, set, go! - Anna RoyzmanQA or the Highway
 
STOP! You're Testing Too Much - Shawn Wallace
STOP!  You're Testing Too Much - Shawn WallaceSTOP!  You're Testing Too Much - Shawn Wallace
STOP! You're Testing Too Much - Shawn WallaceQA or the Highway
 
Training for Automated Testing - Kelsey Shannahan
Training for Automated Testing - Kelsey ShannahanTraining for Automated Testing - Kelsey Shannahan
Training for Automated Testing - Kelsey ShannahanQA or the Highway
 
When Cultures Collide – A tester’s story by Raj Subramanian
When Cultures Collide – A tester’s story by Raj SubramanianWhen Cultures Collide – A tester’s story by Raj Subramanian
When Cultures Collide – A tester’s story by Raj SubramanianQA or the Highway
 
Feedback and its importance in delivering high quality software - Ken De Souza
Feedback and its importance in delivering high quality software - Ken De SouzaFeedback and its importance in delivering high quality software - Ken De Souza
Feedback and its importance in delivering high quality software - Ken De SouzaQA or the Highway
 
Bad metric, bad! - Joseph Ours
Bad metric, bad! - Joseph OursBad metric, bad! - Joseph Ours
Bad metric, bad! - Joseph OursQA or the Highway
 
Improv(e) your testing! - Damian Synadinos
Improv(e) your testing! - Damian SynadinosImprov(e) your testing! - Damian Synadinos
Improv(e) your testing! - Damian SynadinosQA or the Highway
 
How to bake in quality in agile scrum projects
How to bake in quality in agile scrum projectsHow to bake in quality in agile scrum projects
How to bake in quality in agile scrum projectsSantanu Bhattacharya
 
Combinatorial software test design beyond pairwise testing
Combinatorial software test design beyond pairwise testingCombinatorial software test design beyond pairwise testing
Combinatorial software test design beyond pairwise testingJustin Hunter
 
The Art of Gherkin Scripting - Matt Eakin
The Art of Gherkin Scripting - Matt EakinThe Art of Gherkin Scripting - Matt Eakin
The Art of Gherkin Scripting - Matt EakinQA or the Highway
 
Challenging Your Project’s Testing Mindsets - Joe DeMeyer
Challenging Your Project’s Testing Mindsets - Joe DeMeyerChallenging Your Project’s Testing Mindsets - Joe DeMeyer
Challenging Your Project’s Testing Mindsets - Joe DeMeyerQA or the Highway
 
UNIT TESTING PPT
UNIT TESTING PPTUNIT TESTING PPT
UNIT TESTING PPTsuhasreddy1
 
Unit Testing Concepts and Best Practices
Unit Testing Concepts and Best PracticesUnit Testing Concepts and Best Practices
Unit Testing Concepts and Best PracticesDerek Smith
 
Testing Microservices
Testing MicroservicesTesting Microservices
Testing MicroservicesNathan Jones
 

Andere mochten auch (15)

The Risky Business of Testing by Shaminder Rai and Dave Patel
The Risky Business of Testing by Shaminder Rai and Dave PatelThe Risky Business of Testing by Shaminder Rai and Dave Patel
The Risky Business of Testing by Shaminder Rai and Dave Patel
 
Ready, set, go! - Anna Royzman
Ready, set, go! - Anna RoyzmanReady, set, go! - Anna Royzman
Ready, set, go! - Anna Royzman
 
STOP! You're Testing Too Much - Shawn Wallace
STOP!  You're Testing Too Much - Shawn WallaceSTOP!  You're Testing Too Much - Shawn Wallace
STOP! You're Testing Too Much - Shawn Wallace
 
Training for Automated Testing - Kelsey Shannahan
Training for Automated Testing - Kelsey ShannahanTraining for Automated Testing - Kelsey Shannahan
Training for Automated Testing - Kelsey Shannahan
 
When Cultures Collide – A tester’s story by Raj Subramanian
When Cultures Collide – A tester’s story by Raj SubramanianWhen Cultures Collide – A tester’s story by Raj Subramanian
When Cultures Collide – A tester’s story by Raj Subramanian
 
Feedback and its importance in delivering high quality software - Ken De Souza
Feedback and its importance in delivering high quality software - Ken De SouzaFeedback and its importance in delivering high quality software - Ken De Souza
Feedback and its importance in delivering high quality software - Ken De Souza
 
Bad metric, bad! - Joseph Ours
Bad metric, bad! - Joseph OursBad metric, bad! - Joseph Ours
Bad metric, bad! - Joseph Ours
 
Improv(e) your testing! - Damian Synadinos
Improv(e) your testing! - Damian SynadinosImprov(e) your testing! - Damian Synadinos
Improv(e) your testing! - Damian Synadinos
 
How to bake in quality in agile scrum projects
How to bake in quality in agile scrum projectsHow to bake in quality in agile scrum projects
How to bake in quality in agile scrum projects
 
Combinatorial software test design beyond pairwise testing
Combinatorial software test design beyond pairwise testingCombinatorial software test design beyond pairwise testing
Combinatorial software test design beyond pairwise testing
 
The Art of Gherkin Scripting - Matt Eakin
The Art of Gherkin Scripting - Matt EakinThe Art of Gherkin Scripting - Matt Eakin
The Art of Gherkin Scripting - Matt Eakin
 
Challenging Your Project’s Testing Mindsets - Joe DeMeyer
Challenging Your Project’s Testing Mindsets - Joe DeMeyerChallenging Your Project’s Testing Mindsets - Joe DeMeyer
Challenging Your Project’s Testing Mindsets - Joe DeMeyer
 
UNIT TESTING PPT
UNIT TESTING PPTUNIT TESTING PPT
UNIT TESTING PPT
 
Unit Testing Concepts and Best Practices
Unit Testing Concepts and Best PracticesUnit Testing Concepts and Best Practices
Unit Testing Concepts and Best Practices
 
Testing Microservices
Testing MicroservicesTesting Microservices
Testing Microservices
 

Ähnlich wie Cucumber From the Ground Up - Joseph Beale

Page object from the ground up by Joe Beale
Page object from the ground up by Joe BealePage object from the ground up by Joe Beale
Page object from the ground up by Joe BealeQA or the Highway
 
Page object from the ground up.ppt
Page object from the ground up.pptPage object from the ground up.ppt
Page object from the ground up.pptJoseph Beale
 
Behaviour driven infrastructure
Behaviour driven infrastructureBehaviour driven infrastructure
Behaviour driven infrastructureLindsay Holmwood
 
Agile JavaScript Testing
Agile JavaScript TestingAgile JavaScript Testing
Agile JavaScript TestingScott Becker
 
Demystifying Keyword Driven Using Watir
Demystifying Keyword Driven Using WatirDemystifying Keyword Driven Using Watir
Demystifying Keyword Driven Using WatirHirday Lamba
 
Getting Started with Test Automation: Introduction to Cucumber with Lapis Lazuli
Getting Started with Test Automation: Introduction to Cucumber with Lapis LazuliGetting Started with Test Automation: Introduction to Cucumber with Lapis Lazuli
Getting Started with Test Automation: Introduction to Cucumber with Lapis LazuliRebecca Eloise Hogg
 
Automated UI Testing Done Right (QMSDNUG)
Automated UI Testing Done Right (QMSDNUG)Automated UI Testing Done Right (QMSDNUG)
Automated UI Testing Done Right (QMSDNUG)Mehdi Khalili
 
Testing in AngularJS
Testing in AngularJSTesting in AngularJS
Testing in AngularJSPeter Drinnan
 
Testing Web Applications
Testing Web ApplicationsTesting Web Applications
Testing Web ApplicationsSeth McLaughlin
 
The First C# Project Analyzed
The First C# Project AnalyzedThe First C# Project Analyzed
The First C# Project AnalyzedPVS-Studio
 
Ruby for C# Developers
Ruby for C# DevelopersRuby for C# Developers
Ruby for C# DevelopersCory Foy
 
Selenium - The page object pattern
Selenium - The page object patternSelenium - The page object pattern
Selenium - The page object patternMichael Palotas
 
The Ring programming language version 1.3 book - Part 30 of 88
The Ring programming language version 1.3 book - Part 30 of 88The Ring programming language version 1.3 book - Part 30 of 88
The Ring programming language version 1.3 book - Part 30 of 88Mahmoud Samir Fayed
 
North Virginia Coldfusion User Group Meetup - Testbox - July 19th 2017
North Virginia Coldfusion User Group Meetup - Testbox - July 19th 2017North Virginia Coldfusion User Group Meetup - Testbox - July 19th 2017
North Virginia Coldfusion User Group Meetup - Testbox - July 19th 2017Ortus Solutions, Corp
 
Test Automation using Ruby
Test Automation using Ruby Test Automation using Ruby
Test Automation using Ruby Sla Va
 
Beginning AngularJS
Beginning AngularJSBeginning AngularJS
Beginning AngularJSTroy Miles
 
A Novel Approach to Scraping Websites - Rob Ousbey, MozCon 2020
A Novel Approach to Scraping Websites - Rob Ousbey, MozCon 2020A Novel Approach to Scraping Websites - Rob Ousbey, MozCon 2020
A Novel Approach to Scraping Websites - Rob Ousbey, MozCon 2020Rob Ousbey
 
Looking for Bugs in MonoDevelop
Looking for Bugs in MonoDevelopLooking for Bugs in MonoDevelop
Looking for Bugs in MonoDevelopPVS-Studio
 
Javascript unit testing, yes we can e big
Javascript unit testing, yes we can   e bigJavascript unit testing, yes we can   e big
Javascript unit testing, yes we can e bigAndy Peterson
 

Ähnlich wie Cucumber From the Ground Up - Joseph Beale (20)

Page object from the ground up by Joe Beale
Page object from the ground up by Joe BealePage object from the ground up by Joe Beale
Page object from the ground up by Joe Beale
 
Page object from the ground up.ppt
Page object from the ground up.pptPage object from the ground up.ppt
Page object from the ground up.ppt
 
Behaviour driven infrastructure
Behaviour driven infrastructureBehaviour driven infrastructure
Behaviour driven infrastructure
 
Agile JavaScript Testing
Agile JavaScript TestingAgile JavaScript Testing
Agile JavaScript Testing
 
Demystifying Keyword Driven Using Watir
Demystifying Keyword Driven Using WatirDemystifying Keyword Driven Using Watir
Demystifying Keyword Driven Using Watir
 
Getting Started with Test Automation: Introduction to Cucumber with Lapis Lazuli
Getting Started with Test Automation: Introduction to Cucumber with Lapis LazuliGetting Started with Test Automation: Introduction to Cucumber with Lapis Lazuli
Getting Started with Test Automation: Introduction to Cucumber with Lapis Lazuli
 
Automated UI Testing Done Right (QMSDNUG)
Automated UI Testing Done Right (QMSDNUG)Automated UI Testing Done Right (QMSDNUG)
Automated UI Testing Done Right (QMSDNUG)
 
Testing in AngularJS
Testing in AngularJSTesting in AngularJS
Testing in AngularJS
 
Testing Web Applications
Testing Web ApplicationsTesting Web Applications
Testing Web Applications
 
The First C# Project Analyzed
The First C# Project AnalyzedThe First C# Project Analyzed
The First C# Project Analyzed
 
Ruby for C# Developers
Ruby for C# DevelopersRuby for C# Developers
Ruby for C# Developers
 
Selenium - The page object pattern
Selenium - The page object patternSelenium - The page object pattern
Selenium - The page object pattern
 
The Ring programming language version 1.3 book - Part 30 of 88
The Ring programming language version 1.3 book - Part 30 of 88The Ring programming language version 1.3 book - Part 30 of 88
The Ring programming language version 1.3 book - Part 30 of 88
 
North Virginia Coldfusion User Group Meetup - Testbox - July 19th 2017
North Virginia Coldfusion User Group Meetup - Testbox - July 19th 2017North Virginia Coldfusion User Group Meetup - Testbox - July 19th 2017
North Virginia Coldfusion User Group Meetup - Testbox - July 19th 2017
 
Dependency Injection
Dependency InjectionDependency Injection
Dependency Injection
 
Test Automation using Ruby
Test Automation using Ruby Test Automation using Ruby
Test Automation using Ruby
 
Beginning AngularJS
Beginning AngularJSBeginning AngularJS
Beginning AngularJS
 
A Novel Approach to Scraping Websites - Rob Ousbey, MozCon 2020
A Novel Approach to Scraping Websites - Rob Ousbey, MozCon 2020A Novel Approach to Scraping Websites - Rob Ousbey, MozCon 2020
A Novel Approach to Scraping Websites - Rob Ousbey, MozCon 2020
 
Looking for Bugs in MonoDevelop
Looking for Bugs in MonoDevelopLooking for Bugs in MonoDevelop
Looking for Bugs in MonoDevelop
 
Javascript unit testing, yes we can e big
Javascript unit testing, yes we can   e bigJavascript unit testing, yes we can   e big
Javascript unit testing, yes we can e big
 

Mehr von QA or the Highway

KrishnaToolComparisionPPT.pdf
KrishnaToolComparisionPPT.pdfKrishnaToolComparisionPPT.pdf
KrishnaToolComparisionPPT.pdfQA or the Highway
 
Ravi Lakkavalli - World Quality Report.pptx
Ravi Lakkavalli - World Quality Report.pptxRavi Lakkavalli - World Quality Report.pptx
Ravi Lakkavalli - World Quality Report.pptxQA or the Highway
 
Caleb Crandall - Testing Between the Buckets.pptx
Caleb Crandall - Testing Between the Buckets.pptxCaleb Crandall - Testing Between the Buckets.pptx
Caleb Crandall - Testing Between the Buckets.pptxQA or the Highway
 
Thomas Haver - Mobile Testing.pdf
Thomas Haver - Mobile Testing.pdfThomas Haver - Mobile Testing.pdf
Thomas Haver - Mobile Testing.pdfQA or the Highway
 
Thomas Haver - Example Mapping.pdf
Thomas Haver - Example Mapping.pdfThomas Haver - Example Mapping.pdf
Thomas Haver - Example Mapping.pdfQA or the Highway
 
Joe Colantonio - Actionable Automation Awesomeness in Testing Farm.pdf
Joe Colantonio - Actionable Automation Awesomeness in Testing Farm.pdfJoe Colantonio - Actionable Automation Awesomeness in Testing Farm.pdf
Joe Colantonio - Actionable Automation Awesomeness in Testing Farm.pdfQA or the Highway
 
Sarah Geisinger - Continious Testing Metrics That Matter.pdf
Sarah Geisinger - Continious Testing Metrics That Matter.pdfSarah Geisinger - Continious Testing Metrics That Matter.pdf
Sarah Geisinger - Continious Testing Metrics That Matter.pdfQA or the Highway
 
Jeff Sing - Quarterly Service Delivery Reviews.pdf
Jeff Sing - Quarterly Service Delivery Reviews.pdfJeff Sing - Quarterly Service Delivery Reviews.pdf
Jeff Sing - Quarterly Service Delivery Reviews.pdfQA or the Highway
 
Leandro Melendez - Chihuahua Load Tests.pdf
Leandro Melendez - Chihuahua Load Tests.pdfLeandro Melendez - Chihuahua Load Tests.pdf
Leandro Melendez - Chihuahua Load Tests.pdfQA or the Highway
 
Rick Clymer - Incident Management.pdf
Rick Clymer - Incident Management.pdfRick Clymer - Incident Management.pdf
Rick Clymer - Incident Management.pdfQA or the Highway
 
Robert Fornal - ChatGPT as a Testing Tool.pptx
Robert Fornal - ChatGPT as a Testing Tool.pptxRobert Fornal - ChatGPT as a Testing Tool.pptx
Robert Fornal - ChatGPT as a Testing Tool.pptxQA or the Highway
 
Federico Toledo - Extra-functional testing.pdf
Federico Toledo - Extra-functional testing.pdfFederico Toledo - Extra-functional testing.pdf
Federico Toledo - Extra-functional testing.pdfQA or the Highway
 
Andrew Knight - Managing the Test Data Nightmare.pptx
Andrew Knight - Managing the Test Data Nightmare.pptxAndrew Knight - Managing the Test Data Nightmare.pptx
Andrew Knight - Managing the Test Data Nightmare.pptxQA or the Highway
 
Melissa Tondi - Automation We_re Doing it Wrong.pdf
Melissa Tondi - Automation We_re Doing it Wrong.pdfMelissa Tondi - Automation We_re Doing it Wrong.pdf
Melissa Tondi - Automation We_re Doing it Wrong.pdfQA or the Highway
 
Jeff Van Fleet and John Townsend - Transition from Testing to Leadership.pdf
Jeff Van Fleet and John Townsend - Transition from Testing to Leadership.pdfJeff Van Fleet and John Townsend - Transition from Testing to Leadership.pdf
Jeff Van Fleet and John Townsend - Transition from Testing to Leadership.pdfQA or the Highway
 
DesiradhaRam Gadde - Testers _ Testing in ChatGPT-AI world.pptx
DesiradhaRam Gadde - Testers _ Testing in ChatGPT-AI world.pptxDesiradhaRam Gadde - Testers _ Testing in ChatGPT-AI world.pptx
DesiradhaRam Gadde - Testers _ Testing in ChatGPT-AI world.pptxQA or the Highway
 
Damian Synadinos - Word Smatter.pdf
Damian Synadinos - Word Smatter.pdfDamian Synadinos - Word Smatter.pdf
Damian Synadinos - Word Smatter.pdfQA or the Highway
 
Lee Barnes - What Successful Test Automation is.pdf
Lee Barnes - What Successful Test Automation is.pdfLee Barnes - What Successful Test Automation is.pdf
Lee Barnes - What Successful Test Automation is.pdfQA or the Highway
 
Jordan Powell - API Testing with Cypress.pptx
Jordan Powell - API Testing with Cypress.pptxJordan Powell - API Testing with Cypress.pptx
Jordan Powell - API Testing with Cypress.pptxQA or the Highway
 
Carlos Kidman - Exploring AI Applications in Testing.pptx
Carlos Kidman - Exploring AI Applications in Testing.pptxCarlos Kidman - Exploring AI Applications in Testing.pptx
Carlos Kidman - Exploring AI Applications in Testing.pptxQA or the Highway
 

Mehr von QA or the Highway (20)

KrishnaToolComparisionPPT.pdf
KrishnaToolComparisionPPT.pdfKrishnaToolComparisionPPT.pdf
KrishnaToolComparisionPPT.pdf
 
Ravi Lakkavalli - World Quality Report.pptx
Ravi Lakkavalli - World Quality Report.pptxRavi Lakkavalli - World Quality Report.pptx
Ravi Lakkavalli - World Quality Report.pptx
 
Caleb Crandall - Testing Between the Buckets.pptx
Caleb Crandall - Testing Between the Buckets.pptxCaleb Crandall - Testing Between the Buckets.pptx
Caleb Crandall - Testing Between the Buckets.pptx
 
Thomas Haver - Mobile Testing.pdf
Thomas Haver - Mobile Testing.pdfThomas Haver - Mobile Testing.pdf
Thomas Haver - Mobile Testing.pdf
 
Thomas Haver - Example Mapping.pdf
Thomas Haver - Example Mapping.pdfThomas Haver - Example Mapping.pdf
Thomas Haver - Example Mapping.pdf
 
Joe Colantonio - Actionable Automation Awesomeness in Testing Farm.pdf
Joe Colantonio - Actionable Automation Awesomeness in Testing Farm.pdfJoe Colantonio - Actionable Automation Awesomeness in Testing Farm.pdf
Joe Colantonio - Actionable Automation Awesomeness in Testing Farm.pdf
 
Sarah Geisinger - Continious Testing Metrics That Matter.pdf
Sarah Geisinger - Continious Testing Metrics That Matter.pdfSarah Geisinger - Continious Testing Metrics That Matter.pdf
Sarah Geisinger - Continious Testing Metrics That Matter.pdf
 
Jeff Sing - Quarterly Service Delivery Reviews.pdf
Jeff Sing - Quarterly Service Delivery Reviews.pdfJeff Sing - Quarterly Service Delivery Reviews.pdf
Jeff Sing - Quarterly Service Delivery Reviews.pdf
 
Leandro Melendez - Chihuahua Load Tests.pdf
Leandro Melendez - Chihuahua Load Tests.pdfLeandro Melendez - Chihuahua Load Tests.pdf
Leandro Melendez - Chihuahua Load Tests.pdf
 
Rick Clymer - Incident Management.pdf
Rick Clymer - Incident Management.pdfRick Clymer - Incident Management.pdf
Rick Clymer - Incident Management.pdf
 
Robert Fornal - ChatGPT as a Testing Tool.pptx
Robert Fornal - ChatGPT as a Testing Tool.pptxRobert Fornal - ChatGPT as a Testing Tool.pptx
Robert Fornal - ChatGPT as a Testing Tool.pptx
 
Federico Toledo - Extra-functional testing.pdf
Federico Toledo - Extra-functional testing.pdfFederico Toledo - Extra-functional testing.pdf
Federico Toledo - Extra-functional testing.pdf
 
Andrew Knight - Managing the Test Data Nightmare.pptx
Andrew Knight - Managing the Test Data Nightmare.pptxAndrew Knight - Managing the Test Data Nightmare.pptx
Andrew Knight - Managing the Test Data Nightmare.pptx
 
Melissa Tondi - Automation We_re Doing it Wrong.pdf
Melissa Tondi - Automation We_re Doing it Wrong.pdfMelissa Tondi - Automation We_re Doing it Wrong.pdf
Melissa Tondi - Automation We_re Doing it Wrong.pdf
 
Jeff Van Fleet and John Townsend - Transition from Testing to Leadership.pdf
Jeff Van Fleet and John Townsend - Transition from Testing to Leadership.pdfJeff Van Fleet and John Townsend - Transition from Testing to Leadership.pdf
Jeff Van Fleet and John Townsend - Transition from Testing to Leadership.pdf
 
DesiradhaRam Gadde - Testers _ Testing in ChatGPT-AI world.pptx
DesiradhaRam Gadde - Testers _ Testing in ChatGPT-AI world.pptxDesiradhaRam Gadde - Testers _ Testing in ChatGPT-AI world.pptx
DesiradhaRam Gadde - Testers _ Testing in ChatGPT-AI world.pptx
 
Damian Synadinos - Word Smatter.pdf
Damian Synadinos - Word Smatter.pdfDamian Synadinos - Word Smatter.pdf
Damian Synadinos - Word Smatter.pdf
 
Lee Barnes - What Successful Test Automation is.pdf
Lee Barnes - What Successful Test Automation is.pdfLee Barnes - What Successful Test Automation is.pdf
Lee Barnes - What Successful Test Automation is.pdf
 
Jordan Powell - API Testing with Cypress.pptx
Jordan Powell - API Testing with Cypress.pptxJordan Powell - API Testing with Cypress.pptx
Jordan Powell - API Testing with Cypress.pptx
 
Carlos Kidman - Exploring AI Applications in Testing.pptx
Carlos Kidman - Exploring AI Applications in Testing.pptxCarlos Kidman - Exploring AI Applications in Testing.pptx
Carlos Kidman - Exploring AI Applications in Testing.pptx
 

Kürzlich hochgeladen

Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesBernd Ruecker
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Nikki Chapple
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...itnewsafrica
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 

Kürzlich hochgeladen (20)

Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architectures
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 

Cucumber From the Ground Up - Joseph Beale

  • 2. Who am I and why am I here? Name: Joe Beale What is essential to know about me:  I am NOT brilliant. What I hope to accomplish today:  Prove that the bullet point above is correct.  Put to death any fear you might have about writing test automation code.
  • 3. Agenda  Installation: 10:30 – 10:45  Environment Set-up: 10:45 – 11:00  Build and Test: 11:00 – 11:15  Q&A + Fun Time: 11:15 – 11:30
  • 5. Installation MAKE SURE YOU CHECK THE THREE BOXES THAT ARE RIGHT UNDER THE FOLDER SELECTION FIELD.
  • 6. Installation Download DevKit from the RubyInstaller page: Extract to C:DevKit
  • 7. Installation At command prompt, check for correct Ruby installation by typing:  ruby –v [Enter]
  • 8. Installation To install DevKit, navigate to C:DevKit and type the following:  ruby dk.rb init [Enter]  ruby dk.rb install [Enter] Go back to the root directory (C:) and install Cucumber by typing:  gem install cucumber [Enter] You now have Ruby and Cucumber fully installed!
  • 9. Environment Using Windows Explorer, create a new folder on your C drive called test_project.
  • 10. Environment Inside of test_project, create a folder called features, then inside of that create two more: step_definitions and support.
  • 11. Environment RubyMine – A Robust IDE for Ruby Coding RubyMine is also very Cucumber-friendly!
  • 12. Environment We will use RubyMine 5.4.3 for today’s demo:
  • 13. Environment Use the Open Directory command to open up our test_project folder.
  • 14. Environment Create a folder called env.rb inside of the support folder using New –> File from the right-click menu.
  • 15. Environment Need two more gems for this demonstration:  watir-webdriver  rspec Q: What is a Ruby gem? A: A pre-built code module that performs some useful function in Ruby, available for free from https://rubygems.org/
  • 16. Environment Go back to your command prompt and install the gems using this command:  gem install <name of gem> [Enter]
  • 17. Environment Require statements tell Ruby that you are going to use some extra code modules. Q: Why env.rb in the support folder? A: Cucumber knows to run env.rb before anything else and looks for it in support.
  • 18. Build and Test Create a feature file and a test scenario. Cucumber scenarios are written in ordinary business language using Gherkin keywords (“Feature:”, “Scenario:”, “Given”, “When”, “Then”, “And”, “But”).
  • 19. Build and Test Create step definitions using RubyMine’s built-in functionality.
  • 20. Build and Test RubyMine creates a new file called my_steps.rb and adds code blocks with regular expressions to match your Gherkin steps.
  • 21. Build and Test First step: Given I am on the Bing home page To satisfy this step, we need to open a browser and navigate to the Bing home page. How do we do this in Ruby?
  • 22. Build and Test Watir Webdriver is a gem that is built to drive web applications. Since the code is already written, we only need to learn how to use it. http://watirwebdriver.com/
  • 23. Build and Test Right on the front page is the code to create a browser object (along with lots of other stuff): We will use these exact lines of code and modify them slightly for our purposes.
  • 24. Build and Test The small ‘b’ in their examples stands for ‘browser’, but when we create an object we will call it ‘browser’ to avoid confusion. The browser object is created in env.rb so that it is executed before any of the steps
  • 25. Build and Test Q: Why did you put a ‘$’ in front of your object name? A: To indicate that it’s a global variable. We want the browser object to be accessible to all steps, so we make it global.
  • 26. Build and Test In the first step definition, we will put the next line of code, but modified to reflect our global browser object and the URL for Bing.com: Now when we run our Cucumber scenario, the first step will give us…
  • 27. Build and Test The Bing home page!
  • 28. Build and Test A quick word about method calls: the format for calling a method in Ruby is (object name) + dot (‘.’) + (method name). So in the method call below, the object name is ‘$browser’ and the method name is ‘goto’.
  • 29. Build and Test The ‘goto’ method is just one of the pre-defined methods inside of the Watir::Browser class. The method takes one argument: a URL (because it needs to know where to “go to”). Arguments can be passed either inside of parentheses or alongside a method call. So in the previous example, we could have said: $browser.goto(‘http://bing.com’)
  • 30. Build and Test Second step: When I search for "Death Star“ To satisfy this step, we need to interact with two of the elements of the page:  The search text field  The search button (indicated by the magnifying glass icon)
  • 31. Build and Test Watir Webdriver has several methods in the Browser class to interact with the elements that are common to most web pages. In fact, the ones we need are also listed on their front page:
  • 32. Build and Test To interact with the two search elements, we will use the ‘text_field’ and ‘button’ methods. These methods each take one argument: a location as indicated by the syntax (:locater => ‘unique_identifier’). The examples given are these: b.text_field(:id => 'entry_0').set 'your name' b.button(:name => 'submit').click
  • 33. Build and Test The locators are part of the html code for the page elements, and this information is acquired by using Firefox’s “Inspect Element” tool. So if you right-click on the search text field and choose “Inspect Element” from the drop-down menu, you will see the specific html code for that element in the shaded section.
  • 34. Build and Test The most common locator to use is ‘id’. So we will copy the value ‘sb_form_q’ to use in our argument to the ‘text_field’ method.
  • 35. Build and Test One nice feature of Ruby method calls is the ability to “chain” your methods one right after another. Ruby will execute them in the order given, from left to right. That is what you see in the the ‘text_field’ example: b.text_field(:id => 'entry_0').set 'your name' The ‘set’ method is executed right after the ‘text_field’ method.
  • 36. Build and Test You can use the ‘set’ method anytime you have defined a text field element using the ‘text_field’ method. It takes one argument, the word or phrase you wish to place in that field. So, putting it all together, the code for our second step will look like this: Q: Where did ‘search_phrase’ come from?
  • 37. Build and Test As you may recall, our original step definition looked like this: I changed the default variable name ‘arg’ to one that reflects what it actually holds: ‘search_phrase’. The capture group with wildcard grabs the phrase “Star Wars” from the step and throws it into the variable.
  • 38. Build and Test Since the variable ‘search_phrase’ contains a string, then it can be used as an argument for the ‘set’ method. And so we are then able to use that same Ruby code block no matter what phrase is used in the Gherkin step. Step  Step Definition
  • 39. Build and Test Running the test now gives us… That’s No Moon!!!
  • 40. Build and Test For the button element, we’ll do it exactly like we did the text field, except instead of the ‘set’ method, we’ll need to find one that will click the button. The method name in this case is – surprise! – ‘click’. Here’s the example from Watir Webdriver’s front page: b.button(:name => 'submit').click
  • 41. Build and Test The locator they are using is ‘name’, but in our case there is no name, just a magnifying glass symbol. So we’ll inspect the element in order to find the ‘id’ for locating it:
  • 42. Build and Test Adding that into the step gives us this: Again, you can see that we “chained” two methods: first the ‘button’ method to locate a specific element and then the ‘click’method. The latter method does not require any arguments, for obvious reasons.
  • 43. Build and Test Now let’s run it again. Well, that’s better!
  • 44. Build and Test Third step: Then the search results will include "Star Wars“ Somehow we have to get our code to examine the result page and check to see if our result phrase “Star Wars” is found anywhere. This is where the Rspec gem comes into play.
  • 45. Build and Test You might recall that in the env.rb file we told Ruby to require that code: RSpec gives us the ability to “match” values and phrases against an expected result.
  • 46. Build and Test For our purposes, the most relevant RSpec method is ‘should’. This method will check a value from our object against another value and either pass or fail the step based on whether or not it matches. Let’s see how this step might be coded. Q: What does the ‘text’ method do?
  • 47. Build and Test Many of the html elements on a web page will have text associated with them, and most of the time it’s displayed on the page. For any given element, you can request the associated text using the ‘text’ method. The code we used, ‘$browser.text’ will give you all the text on the page.
  • 48. Build and Test The ‘should’ method requires a “matcher” like ‘include’ or ‘==‘ in order to compare with the expected result. The ‘include’ matcher mimics the behavior of the Ruby ‘include?’ method that is part of the String class. If the expression matches the expected value, then the test passes!
  • 49. Build and Test Running one more time gives us this result in RubyMine: Congratulations! You have just passed your first Ruby/Cucumber automated test!
  • 50. Q&A + Fun Time You don’t have to be this guy to automate.
  • 51. Q&A + Fun Time In fact, even this guy could do it.
  • 52. Q&A + Fun Time Questions? Comments? Snark? You can reach me at: joseph_beale@att.net or joseph.beale92@gmail.com or Connect with me on Linked In!