O slideshow foi denunciado.
Utilizamos seu perfil e dados de atividades no LinkedIn para personalizar e exibir anúncios mais relevantes. Altere suas preferências de anúncios quando desejar.
The
Test
Pyramid
Thiago Ghisi
@thiagoghisi

How to balance your test suite to
have a good feedback, from units
to end-to-e...
2002

2007

2010
[

Tests, seriously? It’s a mobile app...

]
108

Shared codebases
144

Devs, QAs and Ops
January, 2009

Brian Marick
@marick

http://www.slideshare.net/jezhumble/creating-maintainable-automated-acceptance-tests
October, 2009

Mike Cohn
@mikewcohn

http://www.slideshare.net/jezhumble/creating-maintainable-automated-acceptance-tests
http://www.slideshare.net/jezhumble/creating-maintainable-automated-acceptance-tests
August, 2010

Jez Humble
@jezhumble
Feedback
[

Perfect!!! Let’s follow the test pyramid
guidelines…

]
easy. :-)

really hard to isolate
the dependencies. :-(

20% of code
coverage. :-(
Functional
Tests

•

UI/End-to-end testing [with full stack]

•

Tests user flow

•

BDD, ATDD

•

Feedback after a coffee...
Cucumber feature file
Honeydew steps
Cucumber
+
Honeydew
step definitions in Ruby
wraps UIAutomator
=

]

https://github.com/amplify-education/honeydew

☺
why
cucumber?
https://speakerdeck.com/nicholaspufal/why-bdd-is-misunderstood
[

Cool.. write as much user-like tests
as you can… PERFECT!!

]
UI test results history (1)
UI test results history (2)
UI test results history (3)
Slow
Flaky / Fragile
Costy
Feedback
the build monkey
http://watirmelon.com/tag/software-testing-pyramid/
Few UI tests
[

OK… let’s do it right now…

]
Unit Test
•

Verify small pieces individually

•

Run fast

• Stable
•

Run a lot of times during development

•

Feedback...
Unit tests results history
Feedback
Android? It’s Java, let’s TDD.
Android TDD
Android SDK classes are not trivial

huge API

eyes on docs

java.lang.RuntimeException: Stub!
test object

result()

assert(expected, obj.result())

Humm,
I’ve seen that..
The ‘2 + 2 = 4’
example!
the object u’re looking at

dependencies
getData()

saveSomething()
when(stub.getData()).thenReturn(data)

getData()

saveSomething()
verify(mock).saveSomething()
mock
fake double stub
dummy
http://martinfowler.com/articles/mocksArentStubs.html
Unit Tests
with
Dependency
injection

Roboguice
DI

Mocks

Robolectric
Android Shadows

jUnit
@Test
Lots of Unit tests
Where are you?

http://www.mountaingoatsoftware.com/blog/the-forgotten-layer-of-the-test-automation-pyramid
http://fabiopereira.me/blog/2012/03/18/introducing-depth-of-test-dot/
backend
external services

libs
API contracts validation
PACTO
https://github.com/thoughtworks/pacto
https://speakerdeck.com/marcosccm/evoluindo-ecossiste...
Service/Integration
tests instead of
end-to-end tests
[

Annnnd.. the manual tests?

]
Session based
exploratory/usability
tests
http://blog.kalistick.com/Agile/harden-testing-pyramid/
http://watirmelon.com/2011/06/10/yet-another-software-testing-pyramid/
http://blog.softed.com/2013/08/26/1883/
Test automation
closer to
the user

Testing on the
level of the users incl. browser,
network,
databases,
external systems,...
http://www.slideshare.net/nashjain/inverting-the-testing-pyramid
http://www.slideshare.net/guestc8adce/pivotal-labs-open-view-presentation-quality-assurance-and-developer-testing-presenta...
http://blog.codeclimate.com/blog/2013/10/09/rails-testing-pyramid/
Feedback
Feedback
http://herdingcats.typepad.com/my_weblog/2011/02/a-radical-book.html
Thank you! ;)
Questions?
Feedback?
A beer?

THIAGO GHISI
@thiagoghisi
tghisi@thoughtworks.com
The Test Pyramid
The Test Pyramid
The Test Pyramid
The Test Pyramid
The Test Pyramid
The Test Pyramid
The Test Pyramid
The Test Pyramid
Próximos SlideShares
Carregando em…5
×

13

Compartilhar

Baixar para ler offline

The Test Pyramid

Baixar para ler offline

How to balance your automated test suite to have a good feedback, from units to end-to-end tests.

Audiolivros relacionados

Gratuito durante 30 dias do Scribd

Ver tudo

The Test Pyramid

  1. 1. The Test Pyramid Thiago Ghisi @thiagoghisi How to balance your test suite to have a good feedback, from units to end-to-end tests.
  2. 2. 2002 2007 2010
  3. 3. [ Tests, seriously? It’s a mobile app... ]
  4. 4. 108 Shared codebases
  5. 5. 144 Devs, QAs and Ops
  6. 6. January, 2009 Brian Marick @marick http://www.slideshare.net/jezhumble/creating-maintainable-automated-acceptance-tests
  7. 7. October, 2009 Mike Cohn @mikewcohn http://www.slideshare.net/jezhumble/creating-maintainable-automated-acceptance-tests
  8. 8. http://www.slideshare.net/jezhumble/creating-maintainable-automated-acceptance-tests
  9. 9. August, 2010 Jez Humble @jezhumble
  10. 10. Feedback
  11. 11. [ Perfect!!! Let’s follow the test pyramid guidelines… ]
  12. 12. easy. :-) really hard to isolate the dependencies. :-( 20% of code coverage. :-(
  13. 13. Functional Tests • UI/End-to-end testing [with full stack] • Tests user flow • BDD, ATDD • Feedback after a coffee sounds perfect business likes that ;)
  14. 14. Cucumber feature file
  15. 15. Honeydew steps
  16. 16. Cucumber + Honeydew step definitions in Ruby wraps UIAutomator = ] https://github.com/amplify-education/honeydew ☺
  17. 17. why cucumber? https://speakerdeck.com/nicholaspufal/why-bdd-is-misunderstood
  18. 18. [ Cool.. write as much user-like tests as you can… PERFECT!! ]
  19. 19. UI test results history (1)
  20. 20. UI test results history (2)
  21. 21. UI test results history (3)
  22. 22. Slow Flaky / Fragile Costy
  23. 23. Feedback
  24. 24. the build monkey
  25. 25. http://watirmelon.com/tag/software-testing-pyramid/
  26. 26. Few UI tests
  27. 27. [ OK… let’s do it right now… ]
  28. 28. Unit Test • Verify small pieces individually • Run fast • Stable • Run a lot of times during development • Feedback instantly
  29. 29. Unit tests results history
  30. 30. Feedback
  31. 31. Android? It’s Java, let’s TDD.
  32. 32. Android TDD Android SDK classes are not trivial huge API eyes on docs java.lang.RuntimeException: Stub!
  33. 33. test object result() assert(expected, obj.result()) Humm, I’ve seen that.. The ‘2 + 2 = 4’ example!
  34. 34. the object u’re looking at dependencies
  35. 35. getData() saveSomething()
  36. 36. when(stub.getData()).thenReturn(data) getData() saveSomething() verify(mock).saveSomething()
  37. 37. mock fake double stub dummy http://martinfowler.com/articles/mocksArentStubs.html
  38. 38. Unit Tests with Dependency injection Roboguice DI Mocks Robolectric Android Shadows jUnit @Test
  39. 39. Lots of Unit tests
  40. 40. Where are you? http://www.mountaingoatsoftware.com/blog/the-forgotten-layer-of-the-test-automation-pyramid
  41. 41. http://fabiopereira.me/blog/2012/03/18/introducing-depth-of-test-dot/
  42. 42. backend external services libs
  43. 43. API contracts validation PACTO https://github.com/thoughtworks/pacto https://speakerdeck.com/marcosccm/evoluindo-ecossistemas-com-consumer-driven-contracts
  44. 44. Service/Integration tests instead of end-to-end tests
  45. 45. [ Annnnd.. the manual tests? ]
  46. 46. Session based exploratory/usability tests
  47. 47. http://blog.kalistick.com/Agile/harden-testing-pyramid/
  48. 48. http://watirmelon.com/2011/06/10/yet-another-software-testing-pyramid/
  49. 49. http://blog.softed.com/2013/08/26/1883/
  50. 50. Test automation closer to the user Testing on the level of the users incl. browser, network, databases, external systems, … User Journey UI Connection of UI tests to a persona like flow through the system $$$ slower fewer Integration Tests of multiple integrated method Unit Tests of single methods without dependencies $ faster more closer to the developer https://my.thoughtworks.com/docs/DOC-21002
  51. 51. http://www.slideshare.net/nashjain/inverting-the-testing-pyramid
  52. 52. http://www.slideshare.net/guestc8adce/pivotal-labs-open-view-presentation-quality-assurance-and-developer-testing-presentation
  53. 53. http://blog.codeclimate.com/blog/2013/10/09/rails-testing-pyramid/
  54. 54. Feedback
  55. 55. Feedback
  56. 56. http://herdingcats.typepad.com/my_weblog/2011/02/a-radical-book.html
  57. 57. Thank you! ;) Questions? Feedback? A beer? THIAGO GHISI @thiagoghisi tghisi@thoughtworks.com
  • marciosousa7528

    Mar. 11, 2020
  • tianioriginal

    Mar. 30, 2018
  • momoyoyo

    Sep. 22, 2015
  • MekSrunyuStittri

    Sep. 16, 2015
  • rerebelo

    Jul. 28, 2015
  • sky_wu

    Jun. 11, 2015
  • MargusPrnsalu

    Jun. 9, 2015
  • magarwalacc

    Aug. 3, 2014
  • barbaracabral

    May. 15, 2014
  • netsf

    Apr. 27, 2014
  • andrefaria

    Jan. 17, 2014
  • rafaelportela_

    Dec. 28, 2013
  • powerirs

    Dec. 27, 2013

How to balance your automated test suite to have a good feedback, from units to end-to-end tests.

Vistos

Vistos totais

3.758

No Slideshare

0

De incorporações

0

Número de incorporações

44

Ações

Baixados

60

Compartilhados

0

Comentários

0

Curtir

13

×