T15	
  
Test	
  Automation	
  
10/5/17	
  13:30	
  
	
  
	
  
	
  
	
  
Integrate	
  Your	
  Test	
  Automation	
  Tools	
  
for	
  More	
  Power	
  
	
  
Presented	
  by:	
  
	
  
Mike	
  Duskis	
  
	
  ProtectWise	
  
	
  
Brought	
  to	
  you	
  by:	
  	
  
	
  	
  
	
  
	
  
	
  
	
  
	
  
350	
  Corporate	
  Way,	
  Suite	
  400,	
  Orange	
  Park,	
  FL	
  32073	
  	
  
888-­‐-­‐-­‐268-­‐-­‐-­‐8770	
  ·∙·∙	
  904-­‐-­‐-­‐278-­‐-­‐-­‐0524	
  -­‐	
  info@techwell.com	
  -­‐	
  http://www.starwest.techwell.com/	
  	
  	
  
	
  
	
  	
  
	
  
 
Mike	
  Duskis	
  
ProtectWise	
  
	
  
Mike	
  Duskis	
  got	
  his	
  test	
  automation	
  start	
  in	
  1997	
  using	
  Rational	
  Robot	
  on	
  a	
  
multimedia	
  interleaving	
  product.	
  Through	
  the	
  years,	
  he	
  rotated	
  through	
  testing,	
  
development,	
  and	
  test	
  management	
  roles	
  for	
  industries	
  ranging	
  from	
  higher	
  
education	
  to	
  medical	
  devices	
  but	
  rarely	
  drifted	
  far	
  from	
  the	
  source	
  code.	
  He	
  
currently	
  plays	
  test	
  automation	
  architect	
  at	
  ProtectWise,	
  an	
  enterprise	
  security	
  
company	
  that	
  records,	
  analyzes,	
  and	
  visualizes	
  network	
  activity	
  on	
  demand.	
  The	
  
service	
  lives	
  in	
  the	
  cloud,	
  but	
  the	
  office	
  overlooks	
  Union	
  Station	
  in	
  Denver,	
  
Colorado.	
  
	
  
Integrate
More Power
your test automation tools for
Anaheim, CA | October 5, 2017
Mike Duskis
Test Automation Architect
ProtectWise
INTRODUCTIONS
INTRODUCTIONS
INTRODUCTIONS
INTRODUCTIONS
INTRODUCTIONS
PRESENTATION MAP
Introductions
Case Study:
I need a tool
Decomposing
the Problem
A Basic Solution
Challenges and Adaptations
CASE STUDY: A REAL-WORLD QUESTION
We create websites and mobile apps in ruby/rails
for the most part, and we'd like to start utilizing a
tool for basic functional and regression testing,
but I'm not sure where to begin.
-- L.S., Senior QA Analyst
CASE STUDY: PROPOSED SOLUTIONS
Calaba.sh android & iOS for mobile apps… you can
wrap it up with cucumber to get the best BDD
experience, for web go to Selenium with Ruby
plugins.
-- S.M., QA Engineer
Been looking at a programme called Eggplant
recently.
-- H.D., Test Analyst
CASE STUDY: PROPOSED SOLUTIONS
Selenium tool with TestNG for Web applications
is good for Ruby… For mobile… Appium or
Eggplant
-- A.P., Senior Test/QA Consultant
CASE STUDY: PROPOSED SOLUTIONS
Robot framework is really good for web
automation
-- B.D., QA Manager
CASE STUDY: PROPOSED SOLUTIONS
I recommend either Watir or Selenium with Ruby
-- A.N., QA Manager
CASE STUDY: PROPOSED SOLUTIONS
Time Machine test tool supports URL API to help
facilitate automating temporal tests.
-- J.E., Sales Manager
CASE STUDY: PROPOSED SOLUTIONS
CASE STUDY: PROPOSED SOLUTIONS
CASE STUDY: PROPOSED SOLUTIONS
We create websites and mobile apps in
ruby/rails for the most part, and we'd like to
start utilizing a tool for basic functional and
regression testing, but I'm not sure where to
begin.
-- L.S., Senior QA Analyst
CASE STUDY: PROPOSED SOLUTIONS
DECOMPOSING THE PROBLEM
We create
websites and
mobile apps in
ruby/rails for
the most part,
and we'd like to
start utilizing a
tool for basic
functional and
regression
testing
DECOMPOSING THE PROBLEM
We create
websites and
mobile apps in
ruby/rails for
the most part,
and we'd like to
start utilizing a
tool for basic
functional and
regression
testing
Inputs: Systems
Under Test
(SUTs)
DECOMPOSING THE PROBLEM
We create
websites and
mobile apps in
ruby/rails for
the most part,
and we'd like to
start utilizing a
tool for basic
functional and
regression
testing
Inputs: Systems
Under Test
(SUTs)
What is the
expected output of
a test process?
DECOMPOSING THE PROBLEM
We create
websites and
mobile apps in
ruby/rails for
the most part,
and we'd like to
start utilizing a
tool to execute
functional tests
and report their
results
Inputs: Systems
Under Test
(SUTs)
DECOMPOSING THE PROBLEM
We create
websites and
mobile apps in
ruby/rails for
the most part,
and we'd like to
start utilizing a
tool to execute
functional tests
and report their
results
Outputs: Reports
Inputs: Systems
Under Test
(SUTs)
DECOMPOSING THE PROBLEM
We create
websites and
mobile apps in
ruby/rails for
the most part,
and we'd like to
start utilizing a
tool to execute
functional tests
and report their
results
Process: Exercise SUTs
Outputs: Reports
Inputs: Systems
Under Test
(SUTs)
A BASIC SOLUTION
We create
websites and
mobile apps in
ruby/rails for
the most part,
and we'd like to
start utilizing a
tool to execute
functional tests
and report their
results
Tool that talks to
web interfaces
A BASIC SOLUTION
We create
websites and
mobile apps in
ruby/rails for
the most part,
and we'd like to
start utilizing a
tool to execute
functional tests
and report their
results
A BASIC SOLUTION
We create
websites and
mobile apps in
ruby/rails for
the most part,
and we'd like to
start utilizing a
tool to execute
functional tests
and report their
results
Tool that talks to
mobile apps
A BASIC SOLUTION
We create
websites and
mobile apps in
ruby/rails for
the most part,
and we'd like to
start utilizing a
tool to execute
functional tests
and report their
results
A BASIC SOLUTION
We create
websites and
mobile apps in
ruby/rails for
the most part,
and we'd like to
start utilizing a
tool to execute
functional tests
and report their
results
Tool that executes
functional tests
A BASIC SOLUTION
We create
websites and
mobile apps in
ruby/rails for
the most part,
and we'd like to
start utilizing a
tool to execute
functional tests
and report their
results
A BASIC SOLUTION
We create
websites and
mobile apps in
ruby/rails for
the most part,
and we'd like to
start utilizing a
tool to execute
functional tests
and report their
results
Tool that generates
reports
A BASIC SOLUTION
We create
websites and
mobile apps in
ruby/rails for
the most part,
and we'd like to
start utilizing a
tool to execute
functional tests
and report their
results
A BASIC SOLUTION
We create
websites and
mobile apps in
ruby/rails for
the most part,
and we'd like to
start utilizing a
tool to execute
functional tests
and report their
results
A BASIC SOLUTION
simplest thing that could possibly work
CHALLENGE: DRIVER MECHANICS
What happens when a test talks to
Selenium or Appium directly?
CHALLENGE: DRIVER MECHANICS
ADAPTATION: SUT ABSTRACTION
Abstract behavior from mechanics
(Page Object Pattern)
ADAPTATION: SUT ABSTRACTION
page
fixtures
app
fixtures
Fixture = Page object +
everything else outside a
test's area of concern
(e.g. browser/device
discovery, authentication,
navigation, event
detection)
CHALLENGE: STARTING TESTS
page
fixtures
app
fixtures
ADAPTATION: MOVE TO C.I.
page
fixtures
app
fixtures
CHALLENGE: SCALABILITY
page
fixtures
app
fixtures
ADAPTATION: DISTRIBUTE BROWSERS
page
fixtures
app
fixtures
Distribute
browsers
ADAPTATION: DISTRIBUTE DEVICES
page
fixtures
app
fixtures
Distribute
browsers
Distributedevices
ADAPTATION: MANAGE TEST CODE
page
fixtures
app
fixtures
Distribute
browsers
Distributedevices
ADAPTATION: CONTAINERIZE
page
fixtures
app
fixtures
Distribute
browsers
Distributedevices
execution environment
CHALLENGE: EXTENSIBILITY
page
fixtures
app
fixtures
Distribute
browsers
Distributedevices
execution environment
ADAPTATION: PUBLISH EVENTS
page
fixtures
app
fixtures
Distribute
browsers
Distributedevices
event
system
reporter
reporter
execution environment
SIDEBAR: PUBLISH/SUBSCRIBE PATTERN
subscriber broker publisher
SIDEBAR: PUBLISH/SUBSCRIBE PATTERN
subscriber broker publisher
subscribe to topic
“foo”
SIDEBAR: PUBLISH/SUBSCRIBE PATTERN
subscriber broker publisher
subscribe to topic
“foo”
“foo”
(arbitrary payload)
SIDEBAR: PUBLISH/SUBSCRIBE PATTERN
subscriber broker publisher
subscribe to topic
“foo”
“foo”
(arbitrary payload)“foo”
(arbitrary payload)
SIDEBAR: PUBLISH/SUBSCRIBE PATTERN
reporter
event
system
test
subscribe to topic
“test started”
“test started”
test name = spam“test started”
test name = spam
ADAPTATION: PUBLISH EVENTS
page
fixtures
app
fixtures
Distribute
browsers
Distributedevices
event
system
reporter
reporter
execution environment
CHALLENGE: ARTIFACTS SCATTERED
page
fixtures
app
fixtures
Distribute
browsers
Distributedevices
event
system
reporter
reporter
execution environment
ADAPTATION: MANAGE ARTIFACTS
page
fixtures
app
fixtures
Distribute
browsers
Distributedevices
event
system
reporter
reporter
artifact
manager
execution environment
CHALLENGE: COMPLEX TEST SCRIPTS
page
fixtures
app
fixtures
Distribute
browsers
Distributedevices
event
system
reporter
reporter
artifact
manager
execution environment
ADAPTATION: BUILD SCAFFOLDS
test scaffold
page
fixtures
app
fixtures
Distribute
browsers
Distributedevices
event
system
reporter
reporter
artifact
manager
execution environment
SIDEBAR: BASIC SCAFFOLD PATTERN
Run setup
function
Run test
script and
capture
failure
Run
teardown
function
SIDEBAR: EXTENDED SCAFFOLD PATTERN
Publish
“test
started”
Provision
fixtures
Run setup
function
Run test
script and
capture
failure
Publish
“test
failed”
Run
teardown
function
Publish
“test
ended”
SIDEBAR: SAMPLE TEST CASES
SIDEBAR: TEST CASE SCAFFOLDING
ADAPTATION: BUILD SCAFFOLDS
test scaffold
page
fixtures
app
fixtures
Distribute
browsers
Distributedevices
event
system
reporter
reporter
artifact
manager
execution environment
RECAP: WHAT DID WE ACCOMPLISH?
RECAP: WHAT DID WE ACCOMPLISH?
1. We decomposed
the problem
RECAP: WHAT DID WE ACCOMPLISH?
1. We decomposed
the problem
2. We designed the
simplest solution that
could possibly work
RECAP: WHAT DID WE ACCOMPLISH?
1. We decomposed
the problem
2. We designed the
simplest solution that
could possibly work
3. We iterated in response
to challenges
RECAP: WHAT DID WE ACCOMPLISH?
4. We discovered common patterns
RECAP: WHAT DID WE ACCOMPLISH?
4. We discovered common patterns
Abstract the SUT using test fixtures
RECAP: WHAT DID WE ACCOMPLISH?
4. We discovered common patterns
Abstract the SUT using test fixtures
Choose a trigger (e.g. continuous integration)
RECAP: WHAT DID WE ACCOMPLISH?
4. We discovered common patterns
Abstract the SUT using test fixtures
Choose a trigger (e.g. continuous integration)
Distribute components using remote services
RECAP: WHAT DID WE ACCOMPLISH?
4. We discovered common patterns
Abstract the SUT using test fixtures
Choose a trigger (e.g. continuous integration)
Distribute components using remote services
Distribute test scripts using source control
RECAP: WHAT DID WE ACCOMPLISH?
4. We discovered common patterns
Abstract the SUT using test fixtures
Choose a trigger (e.g. continuous integration)
Distribute components using remote services
Distribute test scripts using source control
Distribute execution environment using containers
RECAP: WHAT DID WE ACCOMPLISH?
4. We discovered common patterns
Abstract the SUT using test fixtures
Choose a trigger (e.g. continuous integration)
Distribute components using remote services
Distribute test scripts using source control
Distribute execution environment using containers
Support arbitrary concerns by publishing events
RECAP: WHAT DID WE ACCOMPLISH?
4. We discovered common patterns
Abstract the SUT using test fixtures
Choose a trigger (e.g. continuous integration)
Distribute components using remote services
Distribute test scripts using source control
Distribute execution environment using containers
Support arbitrary concerns by publishing events
Manage artifacts centrally
RECAP: WHAT DID WE ACCOMPLISH?
4. We discovered common patterns
Abstract the SUT using test fixtures
Choose a trigger (e.g. continuous integration)
Distribute components using remote services
Distribute test scripts using source control
Distribute execution environment using containers
Support arbitrary concerns by publishing events
Manage artifacts centrally
Simplify scripts by building them on test scaffolds
mike@testbotwrangler.com
CREDITS
Orangeview Junior High School 2015
by Yvonne Tran
https://vimeo.com/119590100
Attribution-NonCommercial License
https://creativecommons.org/licenses/by-nc/3.0/
Commodore PET 4032
by Steve Gray
http://www.6502.org/users/sjgray/collections/commodore/c_4032.jpg
Attribution-NonCommmercial-ShareAlike 3.0 License
http://creativecommons.org/licenses/by-sa/3.0
CREDITS
Top of the world
by Tormod Ulsberg
https://www.flickr.com/photos/tormodspictures/15574265949/in/photostream/
Attribution-NonCommercial-NoDerivs 2.0 Generic License
https://creativecommons.org/licenses/by-nc-nd/2.0/
Quadro de Ferramentas
by Joaquim Pedro Oliveira Martin
https://www.flickr.com/photos/album-jua/5449853522/in/photostream/
Attribution-NonCommmercial-ShareAlike 2.0 Generic License
https://creativecommons.org/licenses/by-nc-sa/2.0/

Integrate Your Test Automation Tools for More Power