42
Model-Based Testing Kristian Karl, Spotify

Kristian Karl

Embed Size (px)

Citation preview

Page 1: Kristian Karl

Model-Based Testing

Kristian Karl, Spotify

Page 2: Kristian Karl

1983 Started programming 1994 Testing and automation 1998 Consultant 2004 Discovered Model-Based Testing 2005 Founded graphwalker.org 2010 Test Manager @Spotify

Page 3: Kristian Karl

●Subscribers: Over 30 million ●Active users: Over 80 million ●Revenue paid to rightsholders: $3bn ●Number of songs: Over 30 million ●Number of playlists: Over 1.5 billion ●Available in 58 markets

Andorra, Argentina, Austria, Australia, Belgium, Bolivia, Brazil, Bulgaria, Canada, Chile, Colombia, Costa Rica, Cyprus, Czech Republic, Denmark, Dominican Republic, Ecuador, El Salvador, Estonia, Finland, France, Germany, Greece, Guatemala, Honduras, Hong Kong, Hungary, Iceland, Ireland, Italy, Latvia, Liechtenstein, Lithuania, Luxembourg, Malaysia, Malta, Mexico, Monaco, New Zealand, Netherlands, Nicaragua, Norway, Panama, Paraguay, Peru, Philippines, Poland, Portugal, Singapore, Slovakia, Spain, Sweden, Switzerland, Taiwan, Turkey, UK, Uruguay and USA.

Fun Facts

Page 4: Kristian Karl

What is Model-Based Testing?

Page 5: Kristian Karl

[Very] [and unscientific] brief history of MBT

15 May, 1997 Software Quality Week Conference in May, 1997

http://www.geocities.ws/model_based_testing/sqw97.pdf

13:52, 30 December 2004First edit in Wikipedia

https://en.wikipedia.org/wiki/Model-based_testing

I met Harry Robinson May 2004http://www.harryrobinson.net/

Page 6: Kristian Karl

What is MBT?

Page 7: Kristian Karl

What is MBT?

● Models are the expected behavior of a System Under Test.

Page 8: Kristian Karl

What is MBT?

● Models are the expected behavior of a System Under Test.

● Models are much simpler than the the reality.

Page 9: Kristian Karl

What is MBT?

● Models are the expected behavior of a System Under Test.

● Models are much simpler than the the reality.● State models are a set of states and the

relationships between them.

Page 10: Kristian Karl

What is MBT?

● Models are the expected behavior of a System Under Test.

● Models are much simpler than the the reality.● State models are a set of states and the

relationships between them.● From the models, test are automatically

generated.

Page 11: Kristian Karl
Page 12: Kristian Karl

Not authenticated

Page 13: Kristian Karl

Login using valid

credentials

Not authenticated

Page 14: Kristian Karl

Login using valid

credentialsAuthenticatedNot

authenticated

Page 15: Kristian Karl

Login using valid

credentialsAuthenticatedNot

authenticated

VertexVertex

Page 16: Kristian Karl

Login using valid

credentialsAuthenticatedNot

authenticated

VertexVertex

Edge

Page 17: Kristian Karl
Page 18: Kristian Karl
Page 19: Kristian Karl
Page 20: Kristian Karl
Page 21: Kristian Karl
Page 22: Kristian Karl
Page 23: Kristian Karl
Page 24: Kristian Karl
Page 25: Kristian Karl
Page 26: Kristian Karl
Page 27: Kristian Karl
Page 28: Kristian Karl
Page 29: Kristian Karl
Page 30: Kristian Karl

Use cases

● UI● Payments systems● Ads● Workflow systems● REST APIs

● Mobile● Desktop● Web● Backend ● Real time systems

Page 31: Kristian Karl

Why bother?

Page 32: Kristian Karl

The incentive behind MBT

Page 33: Kristian Karl

The incentive behind MBT

● MBT is [visual] collaborative.

Page 34: Kristian Karl

The incentive behind MBT

● MBT is [visual] collaborative.● Separation of test design from code

implementation.

Page 35: Kristian Karl

The incentive behind MBT

● MBT is [visual] collaborative.● Separation of test design from code

implementation.● Test suites are generated

automatically.

Page 36: Kristian Karl

The incentive behind MBT

● MBT is [visual] collaborative.● Separation of test design from code

implementation.● Test suites are generated

automatically.● Lower maintenance - higher return of

investment.

Page 37: Kristian Karl

Test execution

Page 38: Kristian Karl

MBT execution

Page 39: Kristian Karl

MBT execution

● Tests are generated automatically.

Page 40: Kristian Karl

MBT execution

● Tests are generated automatically.● Different test types can be generated.

- Smoke tests- Functional - Non-functional, exhaustive tests

Page 41: Kristian Karl

Q&A

Page 42: Kristian Karl

References

●http://graphwalker.org/ ●https://github.com/GraphWalker/graphwalker-project ●https://github.com/GraphWalker/graphwalker-example ●https://github.com/spotify/python-graphwalker ●https://www.youtube.com/watch?v=idSgWX6rGdk ●https://www.youtube.com/watch?v=oWWiPGIFDAo