Slide 1

Slide 1 text

Super Marek’s Testing Strategy Photo from http://www.smartadvisoryltd.com/images/strategy.jpg

Slide 2

Slide 2 text

Marek Matulka @super_marek Photo by @cakper

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

no tests

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

my first unit tests

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

Price Quality Speed

Slide 9

Slide 9 text

Manual regression “testing” Some integration tests A handful of unit tests

Slide 10

Slide 10 text

Ealing Broadway Station

Slide 11

Slide 11 text

Problem Station building is small and overcrowded and at peak times people get stuck trying to change platforms. Station building connecting all platforms Platform 1 Platform 2/3 Platform 4 Platform 5/6

Slide 12

Slide 12 text

Solution Build a footbridge connecting rail platforms. Station building connecting all platforms Platform 1 Platform 2/3 Platform 4 Platform 5/6

Slide 13

Slide 13 text

Delivery Footpath connecting rail platforms. Station building connecting all platforms Platform 1 Platform 2/3 Platform 4 Platform 5/6 Footbridge

Slide 14

Slide 14 text

Result Still blocked platforms. Station building connecting all platforms Platform 1 Platform 2/3 Platform 4 Platform 5/6 Footbridge

Slide 15

Slide 15 text

Tester Detects bugs Prevents bugs QA

Slide 16

Slide 16 text

Who’s responsibility is testing?

Slide 17

Slide 17 text

QA

Slide 18

Slide 18 text

QA BE dev FE dev

Slide 19

Slide 19 text

QA BE dev FE dev PO UX BA

Slide 20

Slide 20 text

my team’s testing strategy

Slide 21

Slide 21 text

Definition of done ● Have one ● Change it as team’s delivery process changes ● Have production environment from day one

Slide 22

Slide 22 text

Tools

Slide 23

Slide 23 text

Make tools work for you ● Story board ○ Virtual e.g. Trello, JIRA ○ Physical e.g. stickies on the wall ● Adjust as your process changes ○ Visualise bottlenecks

Slide 24

Slide 24 text

Story grooming ● Acceptance criteria ● Testing strategy ○ Unit tests enough? ● Slice into smaller stories ● Involve as many people as possible - QA, PO, FE, BE, stakeholders...

Slide 25

Slide 25 text

In development ● Test early! ○ Unit tests ○ Acceptance tests ○ Integration tests ● Peer reviews ● Pair programming ● CI build on every commit

Slide 26

Slide 26 text

Quality Assurance ● Run a build on each commit ○ Make CI do the work for you ● Static analysis ○ Finds flaws missed in PR review ● Env for every branch/PR ○ Allows QA to verify work early, before it’s merged ● QA to merge your PR

Slide 27

Slide 27 text

Monitoring ● Logs collection ○ logstash, papertrail ● Bugs detection ○ bugsnag, sentry ● Alerts ○ new relic, sysdig

Slide 28

Slide 28 text

Acceptance Criteria

Slide 29

Slide 29 text

Given-When-Then Feature: Shopper can see a postage cost In order to see the total cost of the order As a shopper I want to see a postage cost @APP-123 @smoke @database Scenario: Shopper can see a postage cost Given I have added a "Clean Code" book priced £34.50 to the basket And the postage cost for one book is £3.50 When I check the basket Then I should see the postage cost of £3.50 And the total of the basket should be £38.00

Slide 30

Slide 30 text

Write a failing scenario (feature) Write a failing test Make your test pass Refactor your code Make your scenario pass BDD TDD

Slide 31

Slide 31 text

Write a failing scenario (feature) Write a failing test Make your test pass Refactor your code Make your scenario pass BDD TDD External Quality Internal Quality

Slide 32

Slide 32 text

Unit tests Acceptance tests Integration tests E2E tests

Slide 33

Slide 33 text

Unit tests Acceptance tests Integration tests E2E tests $$$$$$ ¢ cost speed

Slide 34

Slide 34 text

Unit tests Acceptance tests Integration tests E2E tests Manual Automated

Slide 35

Slide 35 text

Price Quality Speed

Slide 36

Slide 36 text

Price Sustainability Speed

Slide 37

Slide 37 text

features delivered time

Slide 38

Slide 38 text

(on my current project) Example stack

Slide 39

Slide 39 text

Unit tests Acceptance tests Integration tests E2E tests

Slide 40

Slide 40 text

Thank you! https://speakerdeck.com/super_marek @super_marek