Continuous delivery of insights August 2017 Javier Moscardó mosca@spoti fz .com
The secret is…
VUCA world
Team of teams
The author
@Javi_Mosca
“The right music for every moment” Started in 2006 in Sweden 140M users Available in 61 countries 60M paying subscribers Over 30M songs $5 billion revenue paid to stakeholders Over 2 billion of playlists
The path towards CD of insights
The path towards CD of insights Team of teams
Squad
Alignment example iOS Infra Explore iOS release Search Browse Delorean Catalogue Car integration Artist Album
iOS Infra Explore iOS release ok Search Browse ok ok Catalogue Delorean Artist Car integration Album
Tech Tribe lead
Communication
TPD Tribe leads Tribe leads
Hands off
R&D Tribe leads Tribe leads
Leading like a gardener
The path towards CD of insights Ways of working
Waterfall Discover Design Development Testing Delivery
Agile Design Development Discover Delivery Testing
What are we doing? Discover Design Development Testing Delivery
Discover Design Development Testing Delivery
Pull Request
Mobile clients Con$nuous Delivery Continuous delivery
Backend services Con$nuous Delivery Continuous deployment
The path towards CD of insights Test fj rst approach
Discover Design Development Testing Delivery
Prepare for the worst, hope for the best Volvo Ocean Race
Who owns quality?
QA QA QA
Who tests?
Collaboration
You understand what is important, then you test it, then, if possible, you automate it.
Why test automation?
Manual Exploratory Testing Time cost E2E Integration Tests Unit Tests Static Analysis
When? Local Pre-merge Post-merge Every 2h Less than 10 mins
Where?
Moving slow?
Discover Design Development Delivery Testing
Project Title 00.00.2015 Proprietary & Confidential Spotify 46 Practice continuous delivery
Thank you Join the band! spotify.com/jobs
Check these out… About Spotify More Agile Testing https:/ /press.spotify.com/se/about/ Learning Journeys for the Whole Team Janet Gregory and Lisa Crispin Spotify Culture Team of Teams https:/ /labs.spotify.com/2014/03/27/spotify- engineering-culture-part-1/ New Rules of Engagement for a Complex World https:/ /labs.spotify.com/2014/09/20/spotify- General Stanley McChrystal engineering-culture-part-2/ Build quality, key of continuous Git branching delivery http:/ /nvie.com/posts/a-successful-git-branching- model/ https:/ /leankit.com/blog/2016/10/build-quality-key- continuous-delivery/
GUI testing Scripted Testing vs Model Based Testing
What have we done? Test model Test reporting tools Model interface Non-model Model based tests Implementation Test Data Service UI Layer Client-side test API Java test API JSON data Mobile app View Implementation
Scripted testing @User(flags = TestUserFlag. PREMIUM , tags = UserTag. PLAYLISTS ) @Target(target={TestTarget. SIMULATOR , TestTarget. PHONE }) @Test(groups = {TestGroup. RADIO }, timeOut = Waiter. TIMEOUT_5MIN ) public void startRadioTest() { navigation .openURI( ARTIST_URI ); artist .assertLoaded(); artist .startRadio(); player .assertPlaying(); navigation .openURI( PLAYLIST_URI ); playlist .assertLoaded(); playlist .startRadio(); player .assertPlaying(); navigation .openURI( ALBUM_URI ); album .assertLoaded(); album .startRadio(); player .assertPlaying(); }
Model based testing - MBT
First MBT model
Current MBT model
MBT Interfaces public interface StartRadio { public void e_Init(); public void v_InitialView(); public void e_GoToArtist(); public void v_Artist(); public void e_StartArtistRadio(); public void v_ArtistRadio(); public void e_GoToPlaylist(); public void v_Playlist(); public void e_StartPlaylistRadio(); public void v_PlaylistRadio(); public void e_GoToAlbum(); public void v_Album(); public void e_StartAlbumRadio(); public void v_AlbumRadio(); public void e_Pause(); public void v_TrackNotPlaying(); }
e_Init(); v_InitialView(); e_GoToArtist(); Scripted vs MBT v_Artist(); e_StartArtistRadio(); v_ArtistRadio(); e_Pause(); baseActions.openURL(ARTIST_URI); v_TrackNotPlaying(); artist.assertLoaded(); v_InitialView(); artist.startRadio(); e_GoToAlbum(); player.assertPlaying(); v_Album(); e_StartAlbumRadio(); baseActions.openURL(PLAYLIST_URI); v_AlbumRadio(); playlist.assertLoaded(); e_Pause(); playlist.startRadio(); v_TrackNotPlaying(); player.assertPlaying(); v_InitialView(); e_GoToArtist(); baseActions.openURL(ALBUM_URI); v_Artist(); album.assertLoaded(); e_StartArtistRadio(); album.startRadio(); v_ArtistRadio(); player.assertPlaying(); e_Pause(); v_TrackNotPlaying(); v_InitialView(); e_GoToPlaylist(); v_Playlist(); e_StartPlaylistRadio(); v_PlaylistRadio(); …
Let’s test!
First test scenario Play a track from Search
Repeat it
Repeat it, again
and again
Scripted & MBT Find what is important and automate, what can be automated
Second test scenario Go to “See All tracks” from Search
Scripted & MBT Find what is important and automate, what can be automated
Finding the bug
Preventing the bug
Sources Graphwalker IDE http:/ /graphwalker.github.io/ https:/ /www.jetbrains.com/idea/ Model diagramming https:/ /www.yworks.com/products/yed
Recommend
More recommend