Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Storyplayer
Search
Stuart Herbert
May 02, 2013
Programming
4
12k
Storyplayer
Bring your user and service stories to life through your tests.
Stuart Herbert
May 02, 2013
Tweet
Share
More Decks by Stuart Herbert
See All by Stuart Herbert
Type Integrity: The Software Engineering Behind Stricter Typing
stuartherbert
0
62
Coding Standards That Improve Quality
stuartherbert
0
140
ES-CQRS and GDPR: When Immutability Meets Reality
stuartherbert
1
760
The Container End-Game: An Introduction To Kubernetes And Minikube
stuartherbert
0
120
Multi-Variance: API Versioning For Software Libraries
stuartherbert
1
63
Zend Expressive - An Introduction For API Building
stuartherbert
0
630
Automate, Automate, AUTOMATE!
stuartherbert
0
130
JSON Schema For Validating API Requests
stuartherbert
1
150
Designing For Disaster - Preparing Your Code For Emergencies
stuartherbert
1
230
Other Decks in Programming
See All in Programming
距離関数を極める! / SESSIONS 2024
gam0022
0
280
見せてあげますよ、「本物のLaravel批判」ってやつを。
77web
7
7.7k
CSC509 Lecture 12
javiergs
PRO
0
160
Better Code Design in PHP
afilina
PRO
0
130
アジャイルを支えるテストアーキテクチャ設計/Test Architecting for Agile
goyoki
9
3.3k
TypeScript Graph でコードレビューの心理的障壁を乗り越える
ysk8hori
2
1.1k
「今のプロジェクトいろいろ大変なんですよ、app/services とかもあって……」/After Kaigi on Rails 2024 LT Night
junk0612
5
2.1k
Snowflake x dbtで作るセキュアでアジャイルなデータ基盤
tsoshiro
2
520
ふかぼれ!CSSセレクターモジュール / Fukabore! CSS Selectors Module
petamoriken
0
150
광고 소재 심사 과정에 AI를 도입하여 광고 서비스 생산성 향상시키기
kakao
PRO
0
170
Pinia Colada が実現するスマートな非同期処理
naokihaba
4
220
よくできたテンプレート言語として TypeScript + JSX を利用する試み / Using TypeScript + JSX outside of Web Frontend #TSKaigiKansai
izumin5210
6
1.7k
Featured
See All Featured
Into the Great Unknown - MozCon
thekraken
32
1.5k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
Documentation Writing (for coders)
carmenintech
65
4.4k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
6.8k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.7k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
16
2.1k
How to train your dragon (web standard)
notwaldorf
88
5.7k
The Art of Programming - Codeland 2020
erikaheidi
52
13k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
0
89
Writing Fast Ruby
sferik
627
61k
Optimizing for Happiness
mojombo
376
70k
Raft: Consensus for Rubyists
vanstee
136
6.6k
Transcript
@ $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 Load Balancer 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 Worker Snapshotter Buffered Streams Redis Worker Worker Node Meteor Real-time Streams Node Node HTTP Request GET batch PUSH Scheduler subscription X subscription Y job queue PUSH 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 Ogre Ogre Ogre Ogre Ogre Ogre Ogre Ogre Ogre Ogre Ogre Ogre Ogre Ogre Ogre Ogre Ogre Ogre Ogre Ogre Ogre Ogre Ogre Ogre Ogre Ogre Ogre Ogre Ogre Ogre Ogre Ogre Ogre Ogre Ogre Ogre Ogre 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 Behat PHPSpec Friday, 3 May 13
@ The Neglected Layer Functions & Methods User Interfaces &
APIs Services & Systems PHPUnit Behat PHPSpec ? 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 Behat PHPSpec Friday, 3 May 13
@ Where Storyplayer Fits In Functions & Methods User Interfaces
& APIs Services & Systems PHPUnit Behat PHPSpec 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 Setup 1 Test
Setup 2 Friday, 3 May 13
@ Before We Test Pre-Test Prediction 3 Pre-Test Inspection 4
Friday, 3 May 13
@ Perform The Story Steps Action 5 Friday, 3 May
13
@ Did Anything Happen? Post-Test Inspection 6 Friday, 3 May
13
@ Clean Up Afterwards Test Teardown 7 Test Environment Teardown
8 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 V SP Service
Vagrant VM Deploys Friday, 3 May 13
@ Using The Vagrant Module Vagrant VM V SP Service
Vagrant VM Tests SP Friday, 3 May 13
@ Using The Vagrant Module Vagrant VM V SP 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 V SP Vagrant VM Creates
Friday, 3 May 13
@ Using SavageD Vagrant VM V SP Service Vagrant VM
Deploys SavageD Friday, 3 May 13
@ Using SavageD Vagrant VM V SP Service Vagrant VM
Tests SP SavageD Friday, 3 May 13
@ Using SavageD Vagrant VM V SP Service Vagrant VM
Tests SP SavageD Monitors Friday, 3 May 13
@ Using SavageD Vagrant VM V SP Metrics Server Service
Vagrant VM Tests SP Monitors statsd Graphite SavageD Reports To Friday, 3 May 13
@ Graphite Test your non-functional requirements with Friday, 3 May
13
@ Combined Testing Solution Vagrant VM V SP Metrics Server
Service Vagrant VM Tests SP Monitors statsd Graphite SavageD Reports To Tests Metrics Friday, 3 May 13
@ Everything Should Log Metrics Vagrant VM V SP Metrics
Server Vagrant VM Tests SP Monitors statsd Graphite 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 Behat PHPSpec 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 Behat PHPSpec + 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