kristian karl - experiences of test automation at spotify - eurostar 2013

25
Kristian Karl, Spotify Experiences Of Test Automation at Spotify www.eurostarconferences.com @esconfs #esconfs Insert speaker picture here, no more than 150x150 pixels

Upload: eurostar-conference

Post on 18-Dec-2014

186 views

Category:

Documents


1 download

DESCRIPTION

Presentation from the EuroSTAR Software Testing Conference in 2013 from Gothenburg, Sweden

TRANSCRIPT

Page 1: Kristian Karl - Experiences of Test Automation at Spotify - EuroSTAR 2013

Kristian Karl, Spotify

Experiences Of Test Automation at Spotify

www.eurostarconferences.com

@esconfs#esconfs

Insert speaker picture here, no more than 150x150 pixels

Page 2: Kristian Karl - Experiences of Test Automation at Spotify - EuroSTAR 2013

October 16, 2013

Experiences Of Test Automation

@ SpotifyKristian Karl

Page 3: Kristian Karl - Experiences of Test Automation at Spotify - EuroSTAR 2013
Page 4: Kristian Karl - Experiences of Test Automation at Spotify - EuroSTAR 2013

Scaling Agile @ Spotify with Tribes, Squads, Chapters & Guilds, by Henrik Kniberg & Anders Ivarsson

Page 5: Kristian Karl - Experiences of Test Automation at Spotify - EuroSTAR 2013
Page 6: Kristian Karl - Experiences of Test Automation at Spotify - EuroSTAR 2013

Why automate?

• We want to be faster

• Shorter release cycles

• Facilitate the testing in

agile dev cycle

From: ”Intelligent Test Automation” by Harry Robinson

Page 7: Kristian Karl - Experiences of Test Automation at Spotify - EuroSTAR 2013

What to automate?

Graphical user interface testingUsability testingSoftware performance testingSystem testingFunctional testingLoad testingVolume testingStress testingSecurity testingScalability testingSanity testing

Unit testingSmoke testingComponent testingAPI testingRegression testingInstallation testingMaintenance testingRecovery and failover testing.Accessibility testingMonkey testingIntegration testing

Graphical user interface testing

Page 8: Kristian Karl - Experiences of Test Automation at Spotify - EuroSTAR 2013

Our challenges• Hard-to-test SUT

(Experiences of test automation: case study 1, An Agile Team’s Test

Automation Journey: The First Year), Dorothy Graham & Mark

Fewster)

• Maintenance of automation

• Peoples expectations

• Flaky SUTs

• Flaky tests

• Re-prioritizations of non-critical but test hindering bugs

• Test data, test environments

• Supporting services

Page 9: Kristian Karl - Experiences of Test Automation at Spotify - EuroSTAR 2013

Our goals• Create automated end-user regression tests on 4 major

platforms1) Desktop – Windows and OSX

2) iOS – iPhone and iPad

3) Android

4) Webplayer

• To facilitate the workload for testers

• To deliver automated regression tests for a feature as a part of

definition of done

• To deliver short feedback loops to teams using Dashboards

Page 10: Kristian Karl - Experiences of Test Automation at Spotify - EuroSTAR 2013
Page 11: Kristian Karl - Experiences of Test Automation at Spotify - EuroSTAR 2013

Model-based testing

• The models are the abstraction layer

• The testers designs the automation

using models

• The developers implements the code

of the automation

Page 12: Kristian Karl - Experiences of Test Automation at Spotify - EuroSTAR 2013

Login view displayed

Main view displayed

Valid credentials

App not running

Start app

Log out

Close

Exit app

Invalid credentialsToggle

’Remember Me’

Start app

Page 13: Kristian Karl - Experiences of Test Automation at Spotify - EuroSTAR 2013
Page 14: Kristian Karl - Experiences of Test Automation at Spotify - EuroSTAR 2013

public interface SimpleLogin {

public void e_Close();

public void e_Exit();

public void e_Init();

public void e_InvalidCredentials();

public void e_Logout();

public void e_StartClient();

public void e_ToggleRememberMe();

public void e_ValidPremiumCredentials();

public void v_ClientNotRunning();

public void v_LoginPrompted();

public void v_WhatsNew();

}

Page 15: Kristian Karl - Experiences of Test Automation at Spotify - EuroSTAR 2013

Dem

o

Page 16: Kristian Karl - Experiences of Test Automation at Spotify - EuroSTAR 2013

Developers and developers

• Why not use developers for TA?

• Why use developers for TA?

• Using Test API’s

• Defined by TA

• Implemented by developers

Page 17: Kristian Karl - Experiences of Test Automation at Spotify - EuroSTAR 2013
Page 18: Kristian Karl - Experiences of Test Automation at Spotify - EuroSTAR 2013

Before

android.view.View seekBarView =

solo.getView(com.spotify.mobile.android.ui.view.CancellableSeekBar.class, 0);

int[] xy = new int[2];

seekBarView.getLocationOnScreen(xy);

solo.clickOnScreen(xy[0] + 9 + (seekBarView.getWidth() - 18) * position, xy[1] +

seekBarView.getHeight() / 2.0f);

After

page().seekTrack(position)

Page 19: Kristian Karl - Experiences of Test Automation at Spotify - EuroSTAR 2013

Supporting services

• Continuous testing

• QA Lab

• TDS – Test Data Service

• TRS – Test Result Service

Page 20: Kristian Karl - Experiences of Test Automation at Spotify - EuroSTAR 2013
Page 21: Kristian Karl - Experiences of Test Automation at Spotify - EuroSTAR 2013
Page 22: Kristian Karl - Experiences of Test Automation at Spotify - EuroSTAR 2013
Page 23: Kristian Karl - Experiences of Test Automation at Spotify - EuroSTAR 2013

Open source tools that we use

• yEd – editing FSM models [www.yworks.com]

• GraphWalker – generate test sequences from models [graphwalker.org github.com/spotify/python-graphwalker]

• Sikuli – image recognition tool [www.sikuli.org]

• NuRemote - communicating with iOS client [github.com/nevyn/NuRemoting]

• TestNG – group tests into suites and and run them [testng.org]

• Java – code implementation

• Jenkins – [test] job scheduler 24/7 [jenkins-ci.org]

Page 24: Kristian Karl - Experiences of Test Automation at Spotify - EuroSTAR 2013

Demo

Page 25: Kristian Karl - Experiences of Test Automation at Spotify - EuroSTAR 2013

Q & A