SlideShare ist ein Scribd-Unternehmen logo
1 von 83
@
$story->player()
Friday, 3 May 13
@
Bring Your Stories To Life
Through Your Tests
Friday, 3 May 13
@Introduce Yourselves
Friday, 3 May 13
@
@stuherbert
Friday, 3 May 13
@
Testing
I’m here to talk about
Friday, 3 May 13
@Don’t Switch Off Just Yet!
Friday, 3 May 13
@
Storyplayer
I’m here to launch
Friday, 3 May 13
@
Storyplayer
is a new open-source testing tool
Friday, 3 May 13
@
Created by
Friday, 3 May 13
@
built in
Friday, 3 May 13
@
hosted on
Friday, 3 May 13
@
to test this:
We’ve built it
Friday, 3 May 13
@DataSift Technical Architecture
Ultrahose
Archiver
push
Pickle
Node
Pickle
Node
Pickle
Node
Pickle
Node
Pickle
Node
Pickle
Node
Node Shard
push
Pickle
Node
Pickle
Node
Pickle
Node
Pickle
Node
Pickle
Node
Pickle
Node
Node Shard
ACL
(with interaction
counter)
HttpStreaming,PuSH,Search
Stream
Recorder
Monitoring
Aggregator
EDRs
(licensed
content
metrics)
Control
Channels
(D5)Hardware
LoadBalancer
Ultrahose
Archiver
100%
Prism
100%
Pickle
Filtering
Engine
Twitter
Facebook
Wikipedia
Reddit
LexisNexis
Meltwater
Estimize
Digg
@lorenzoalberton
DataSift Architecture 2.2
Links Resolution
+ OpenGraph
+ Twitter Cards
+ Metadata
Deletes
Processor
Redis
Input Streams
NewsCred
BoardReader
MySpace
SuperFeeder
Augmentation Pipeline
push
Pickle
Node
Pickle
Node
Pickle
Node
Pickle
Node
Pickle
Node
Pickle
Node
Node Shard
push
Pickle
Node
Pickle
Node
Pickle
Node
Pickle
Node
Pickle
Node
Pickle
Node
Node Shard
Monitoring
Kafka
Queue
Events
Storage
ACL
(with interaction
counter)
tracker
Limit
Manager
Authentication
Manager
Notification
Service
WEB
API
Stream .
Manager .DB
Definition .
Manager .DB
CSDL Compiler,
Validator,
Normaliser
Historics
Scheduler
Recording
Scheduler
Push
Scheduler
Interaction
Targets
Mapping
Filtering
Tardis
Pickle
Interaction
Targets
Mapping
Filtering
Tardis
Pickle
...
...
Hadoop
Titan Historics
Map/Reduce
HBase Cluster
Region 1 Region 2 Region N...
...
Data Node Data Node Data Node Data Node Data Node
100%
100%
Stop
PUB
License
Manager DB
Billing
Pipeline DB
DB
DB
Mask
Manager
DB
Connection
Manager
Time Machine + Insights
Post-Processing, Stream Analytics
jobs
DB
chunks
DB
chunk
selector
job
tracker
WorkerSnapshotter
Buffered
Streams
Redis
Worker
Worker
NodeMeteor
Real-time
Streams
Node
Node
HTTP Request
GET batch
PUSH
Scheduler
subscription X
subscription Y
job queuePUSH
Producer
Subscriptions
DB
PUSH
Delivery
HTTP(S) POST
(S)FTP
Amazon S3
DynamoDB
Microsoft Azure
MongoDB
Exports and
Analytics
WebSockets
HTTPStreaming
Delivery Subscriptions
Connections
Storage
kafka-consumer
Oracle
Stream
results
CouchDB
PickleDB .DB
Audit
Kafka
Kafka
Historical Queries
@datasift
Goblin Head
Goblin Head
Goblin Head
Goblin Tail
Goblin Tail
Goblin Tail
Interaction
Generation
Interaction
Generation
3rd party APIs
Demographics
Trends
Analysis
Sentiment
Analysis
Named
Entities
Topics
Analysis
Language
Detection
Klout
Score + Profile
Ogre
OgreOgreOgreOgre
Ogre
Ogre
OgreOgreOgreOgre
Ogre
Ogre
Ogre
Ogre
Ogre
OgreOgreOgreOgre
Ogre
Ogre
OgreOgreOgreOgre
Ogre
Ogre
OgreOgreOgreOgre
Ogre
Ogre
OgreOgreOgreOgre
Ogre
IBM Cognos
HDFS
Archiver
Data ingestion + Augmentation
Bit.ly
Stream
Splitter/Joiner
Deduper
Msg splitter
Google BigQuery
Stream results
Cloud Storage
DBs
BI tools
Friday, 3 May 13
@
It Plugs A Gap
In our testing strategy
Friday, 3 May 13
@
Testing Strategy?
What is our
Friday, 3 May 13
@
Layered Approach
Catch different problems
using different tools
Friday, 3 May 13
@Common Test Approach
Unit
Tests
Acceptance
Tests
Integration
Tests
Friday, 3 May 13
@The Focus Of Each Layer
Functions
& Methods
User Interfaces
& APIs
Services
& Systems
Friday, 3 May 13
@The De Facto Standard
Functions
& Methods
User Interfaces
& APIs
Services
& Systems
PHPUnit
Friday, 3 May 13
@Popular Choices
Functions
& Methods
User Interfaces
& APIs
Services
& Systems
PHPUnit
BehatPHPSpec
Friday, 3 May 13
@The Neglected Layer
Functions
& Methods
User Interfaces
& APIs
Services
& Systems
PHPUnit
BehatPHPSpec
?
Friday, 3 May 13
@
Services & Systems?
How do we test
Friday, 3 May 13
@A Gap To Plug
Functions
& Methods
User Interfaces
& APIs
Services
& Systems
PHPUnit
BehatPHPSpec
Friday, 3 May 13
@Where Storyplayer Fits In
Functions
& Methods
User Interfaces
& APIs
Services
& Systems
PHPUnit
BehatPHPSpec
Storyplayer
Friday, 3 May 13
@
A Quick Tour
of Storyplayer
Friday, 3 May 13
@
Stories
It’s all about
Friday, 3 May 13
@
User Stories
The things that your
end-users can (and can’t!) do
Friday, 3 May 13
@
Service Stories
The things that your
internal systems can do
Friday, 3 May 13
@
Prose
Friday, 3 May 13
@
$story =
newStoryFor();
Friday, 3 May 13
@
Simple PHP Scripts
We don’t define a new class
for every story we want to test
Friday, 3 May 13
@
Avoids the
class AVeryLongAndInventiveClassname
* 1000 problem!
Friday, 3 May 13
@
Stories have up to
8 Phases
Friday, 3 May 13
@Creating The Test Conditions
Test Environment Setup1
Test Setup2
Friday, 3 May 13
@Before We Test
Pre-Test Prediction3
Pre-Test Inspection4
Friday, 3 May 13
@Perform The Story Steps
Action5
Friday, 3 May 13
@Did Anything Happen?
Post-Test Inspection6
Friday, 3 May 13
@Clean Up Afterwards
Test Teardown7
Test Environment Teardown8
Friday, 3 May 13
@
Closure
Each phase is a
Friday, 3 May 13
@
$story->setTestEnvironmentSetup(function($st) {
// story steps go here
});
Friday, 3 May 13
@
the $st object
All actions are done using
Friday, 3 May 13
@
The $st object
is a dynamic module loader
Friday, 3 May 13
@
Brand new objects
are instantiated
every new action
Friday, 3 May 13
@
This approach ensures
no weird bugs in tests
caused by re-using
objects between actions
Friday, 3 May 13
@
3 kinds of action
There are
Friday, 3 May 13
@
$st->fromXXXX()
Get the state of something
Friday, 3 May 13
@
$st->expectsXXXX()
Test the state of something
Friday, 3 May 13
@
$st->usingXXXX()
Change the state of something
Friday, 3 May 13
@
$story->addAction(function($st) {
$st->usingBrowser()->gotoPage(...);
$st->usingBrowser()->waitForTitle(...);
....
});
Friday, 3 May 13
@
$story->setPostTestInspection(function($st) {
$st->usingBrowser()->gotoPage(...);
$st->usingBrowser()->waitForTitle(...);
$st->expectsBrowser()
->has()
->linkWithText(“My Account”);
});
Friday, 3 May 13
@
14 Modules
Included
Friday, 3 May 13
@
Vagrant
Create test environments using
Friday, 3 May 13
@Using The Vagrant Module
SP
Vagrant VM
V
Vagrant VM
Creates
Friday, 3 May 13
@Using The Vagrant Module
Vagrant VM
VSP Service
Vagrant VM
Deploys
Friday, 3 May 13
@Using The Vagrant Module
Vagrant VM
VSP Service
Vagrant VM
Tests
SP
Friday, 3 May 13
@Using The Vagrant Module
Vagrant VM
VSP Service
Vagrant VM
Destroys
Friday, 3 May 13
@
SavageD
Monitor your VMs and processes using
(Another DataSift tool we’re releasing tonight)
Friday, 3 May 13
@Using SavageD
Vagrant VM
VSP
Vagrant VM
Creates
Friday, 3 May 13
@Using SavageD
Vagrant VM
VSP Service
Vagrant VM
Deploys
SavageD
Friday, 3 May 13
@Using SavageD
Vagrant VM
VSP Service
Vagrant VM
Tests
SP SavageD
Friday, 3 May 13
@Using SavageD
Vagrant VM
VSP Service
Vagrant VM
Tests
SP SavageD
Monitors
Friday, 3 May 13
@Using SavageD
Vagrant VM
VSP
Metrics Server
Service
Vagrant VM
Tests
SP
Monitors
statsdGraphite
SavageD
Reports To
Friday, 3 May 13
@
Graphite
Test your non-functional requirements with
Friday, 3 May 13
@Combined Testing Solution
Vagrant VM
VSP
Metrics Server
Service
Vagrant VM
Tests
SP
Monitors
statsdGraphite
SavageD
Reports To
Tests Metrics
Friday, 3 May 13
@Everything Should Log Metrics
Vagrant VM
VSP
Metrics Server
Vagrant VM
Tests
SP
Monitors
statsdGraphite
SavageD
Reports To
Tests Metrics
Service
Friday, 3 May 13
@
Your Own Modules
Extend Storyplayer with
Friday, 3 May 13
@
Pull Requests
Welcome :)
Friday, 3 May 13
@
OS X and Linux
Runs on
Friday, 3 May 13
@
PEAR
Installed via
Friday, 3 May 13
@
(Composer doesn’t support
installing packages system-wide yet)
Friday, 3 May 13
@
datasift.github.io
Docs available from
(WIP!!)
Friday, 3 May 13
@
Before You Go ...
Friday, 3 May 13
@This Model Is Incomplete
Functions
& Methods
User Interfaces
& APIs
Services
& Systems
PHPUnit
BehatPHPSpec
Storyplayer
Friday, 3 May 13
@... getting better :) ...
Functions
& Methods
User Interfaces
& APIs
Services
& Systems
PHPUnit
Storyplayer+
Friday, 3 May 13
@
Storyplayer
can test websites
and APIs too!
Friday, 3 May 13
@
Storyplayer
doesn’t replace Behat et al
Friday, 3 May 13
@
Behat
moves back to doing
what it does best
Friday, 3 May 13
@A Better Model Of Layered Testing
Functions
& Methods
User Interfaces
& APIs
Services
& Systems
PHPUnit
Storyplayer+
Acceptance
BehatPHPSpec
+
Friday, 3 May 13
@
Developers
take responsibility
for unit testing
Friday, 3 May 13
@
Developers + Testers
share responsibility
for testing
services & systems
user interfaces & APIs
Friday, 3 May 13
@
Product Owners
take responsibility
for acceptance testing
Friday, 3 May 13
@
Storyplayer
https://github.com/datasift/storyplayer/
available now!
Friday, 3 May 13
@
Thank you
PS: We’re hiring :-)
Friday, 3 May 13

Weitere ähnliche Inhalte

Ähnlich wie Storyplayer

Simplified security code review - BSidesQuebec2013
Simplified security code review - BSidesQuebec2013Simplified security code review - BSidesQuebec2013
Simplified security code review - BSidesQuebec2013
BSidesQuebec2013
 
Building scalable applications while scaling your infrastructure by rhommel l...
Building scalable applications while scaling your infrastructure by rhommel l...Building scalable applications while scaling your infrastructure by rhommel l...
Building scalable applications while scaling your infrastructure by rhommel l...
NETWAYS
 
Applying Evolutionary Architecture on a Popular API
Applying Evolutionary Architecture on a  Popular APIApplying Evolutionary Architecture on a  Popular API
Applying Evolutionary Architecture on a Popular API
Phil Calçado
 
Simplified Security Code Review Process
Simplified Security Code Review ProcessSimplified Security Code Review Process
Simplified Security Code Review Process
Sherif Koussa
 
新しい IE と JavaScriptで動く 最近のWebアプリケーション
新しい IE と JavaScriptで動く 最近のWebアプリケーション新しい IE と JavaScriptで動く 最近のWebアプリケーション
新しい IE と JavaScriptで動く 最近のWebアプリケーション
yomotsu
 
Matt training-html-halfday
Matt training-html-halfdayMatt training-html-halfday
Matt training-html-halfday
Matthew Dobson
 
Lost in o auth? learn velruse and get your life back
Lost in o auth? learn velruse and get your life backLost in o auth? learn velruse and get your life back
Lost in o auth? learn velruse and get your life back
Andrew Mleczko
 
Deprecating ActiveRecord Attributes without making Zombies
Deprecating ActiveRecord Attributes without making ZombiesDeprecating ActiveRecord Attributes without making Zombies
Deprecating ActiveRecord Attributes without making Zombies
yann ARMAND
 

Ähnlich wie Storyplayer (20)

Become Master of Your Own Universe - DIBI 2013
Become Master of Your Own Universe - DIBI 2013Become Master of Your Own Universe - DIBI 2013
Become Master of Your Own Universe - DIBI 2013
 
Ab(Using) the MetaCPAN API for Fun and Profit v2013
Ab(Using) the MetaCPAN API for Fun and Profit v2013Ab(Using) the MetaCPAN API for Fun and Profit v2013
Ab(Using) the MetaCPAN API for Fun and Profit v2013
 
Simplified security code review - BSidesQuebec2013
Simplified security code review - BSidesQuebec2013Simplified security code review - BSidesQuebec2013
Simplified security code review - BSidesQuebec2013
 
jQuery Mobile, Backbone.js, and ASP.NET MVC
jQuery Mobile, Backbone.js, and ASP.NET MVCjQuery Mobile, Backbone.js, and ASP.NET MVC
jQuery Mobile, Backbone.js, and ASP.NET MVC
 
Building scalable applications while scaling your infrastructure by rhommel l...
Building scalable applications while scaling your infrastructure by rhommel l...Building scalable applications while scaling your infrastructure by rhommel l...
Building scalable applications while scaling your infrastructure by rhommel l...
 
Building scalable applications while scaling your infrastructure by rhommel l...
Building scalable applications while scaling your infrastructure by rhommel l...Building scalable applications while scaling your infrastructure by rhommel l...
Building scalable applications while scaling your infrastructure by rhommel l...
 
Applying Evolutionary Architecture on a Popular API
Applying Evolutionary Architecture on a  Popular APIApplying Evolutionary Architecture on a  Popular API
Applying Evolutionary Architecture on a Popular API
 
Simplified Security Code Review Process
Simplified Security Code Review ProcessSimplified Security Code Review Process
Simplified Security Code Review Process
 
新しい IE と JavaScriptで動く 最近のWebアプリケーション
新しい IE と JavaScriptで動く 最近のWebアプリケーション新しい IE と JavaScriptで動く 最近のWebアプリケーション
新しい IE と JavaScriptで動く 最近のWebアプリケーション
 
Testing Drupal with Ghosts and Gherkin
Testing Drupal  with Ghosts and GherkinTesting Drupal  with Ghosts and Gherkin
Testing Drupal with Ghosts and Gherkin
 
Keeping it small - Getting to know the Slim PHP micro framework
Keeping it small - Getting to know the Slim PHP micro frameworkKeeping it small - Getting to know the Slim PHP micro framework
Keeping it small - Getting to know the Slim PHP micro framework
 
Matt training-html-halfday
Matt training-html-halfdayMatt training-html-halfday
Matt training-html-halfday
 
Green Shoots in the Brownest Field: Being a Startup in Government
Green Shoots in the Brownest Field: Being a Startup in GovernmentGreen Shoots in the Brownest Field: Being a Startup in Government
Green Shoots in the Brownest Field: Being a Startup in Government
 
What Is This Continuous Delivery Thing Anyway? - PuppetConf 2013
What Is This Continuous Delivery Thing Anyway? - PuppetConf 2013What Is This Continuous Delivery Thing Anyway? - PuppetConf 2013
What Is This Continuous Delivery Thing Anyway? - PuppetConf 2013
 
Lost in o auth? learn velruse and get your life back
Lost in o auth? learn velruse and get your life backLost in o auth? learn velruse and get your life back
Lost in o auth? learn velruse and get your life back
 
Apache TomEE, Java EE 6 Web Profile on Tomcat - David Blevins
Apache TomEE, Java EE 6 Web Profile on Tomcat - David BlevinsApache TomEE, Java EE 6 Web Profile on Tomcat - David Blevins
Apache TomEE, Java EE 6 Web Profile on Tomcat - David Blevins
 
Workers of the web - BrazilJS 2013
Workers of the web - BrazilJS 2013Workers of the web - BrazilJS 2013
Workers of the web - BrazilJS 2013
 
Taming Pythons with ZooKeeper
Taming Pythons with ZooKeeperTaming Pythons with ZooKeeper
Taming Pythons with ZooKeeper
 
Fault Tolerance 101
Fault Tolerance 101 Fault Tolerance 101
Fault Tolerance 101
 
Deprecating ActiveRecord Attributes without making Zombies
Deprecating ActiveRecord Attributes without making ZombiesDeprecating ActiveRecord Attributes without making Zombies
Deprecating ActiveRecord Attributes without making Zombies
 

Kürzlich hochgeladen

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Kürzlich hochgeladen (20)

What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 

Storyplayer