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
65
Coding Standards That Improve Quality
stuartherbert
0
140
ES-CQRS and GDPR: When Immutability Meets Reality
stuartherbert
1
800
The Container End-Game: An Introduction To Kubernetes And Minikube
stuartherbert
0
120
Multi-Variance: API Versioning For Software Libraries
stuartherbert
1
68
Zend Expressive - An Introduction For API Building
stuartherbert
0
630
Automate, Automate, AUTOMATE!
stuartherbert
0
140
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
苦しいTiDBへの移行を乗り越えて快適な運用を目指す
leveragestech
0
1.2k
AWS Step Functions は CDK で書こう!
konokenj
4
840
やっと腹落ち「スプリント毎に動くモノをリリースする」〜ゼロから始めるメガバンクグループのアジャイル実践〜
sasakendayo
0
110
メンテが命: PHPフレームワークのコンテナ化とアップグレード戦略
shunta27
0
320
dbt Pythonモデルで実現するSnowflake活用術
trsnium
0
270
自力でTTSモデルを作った話
zgock999
0
120
データベースのオペレーターであるCloudNativePGがStatefulSetを使わない理由に迫る
nnaka2992
0
250
CDKを使ったPagerDuty連携インフラのテンプレート化
shibuya_shogo
0
120
Better Code Design in PHP
afilina
0
180
Honoとフロントエンドの 型安全性について
yodaka
7
1.5k
.NET Frameworkでも汎用ホストが使いたい!
tomokusaba
0
210
CSS Linter による Baseline サポートの仕組み
ryo_manba
1
160
Featured
See All Featured
Stop Working from a Prison Cell
hatefulcrawdad
268
20k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
Writing Fast Ruby
sferik
628
61k
Docker and Python
trallard
44
3.3k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
[RailsConf 2023] Rails as a piece of cake
palkan
53
5.3k
How to Think Like a Performance Engineer
csswizardry
22
1.4k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
Speed Design
sergeychernyshev
27
820
Adopting Sorbet at Scale
ufuk
75
9.2k
We Have a Design System, Now What?
morganepeng
51
7.4k
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