Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Super Marek's Testing Strategy (LeedsPHP meetup)

Super Marek's Testing Strategy (LeedsPHP meetup)

Talk presented at the LeedsPHP meetup.

Marek Matulka

May 16, 2018
Tweet

More Decks by Marek Matulka

Other Decks in Programming

Transcript

  1. 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
  2. Solution Build a footbridge connecting rail platforms. Station building connecting

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

    Platform 1 Platform 2/3 Platform 4 Platform 5/6 Footbridge
  4. QA

  5. Definition of done • Have one • Change it as

    team’s delivery process changes • Have production environment from day one
  6. 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
  7. Story grooming • Acceptance criteria • Testing strategy ◦ Unit

    tests enough? • Slice into smaller stories • Involve as many people as possible - QA, PO, FE, BE, stakeholders...
  8. In development • Test early! ◦ Unit tests ◦ Acceptance

    tests ◦ Integration tests • Peer reviews • Pair programming • CI build on every commit
  9. 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
  10. Monitoring • Logs collection ◦ logstash, papertrail • Bugs detection

    ◦ bugsnag, sentry • Alerts ◦ new relic, sysdig
  11. 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
  12. Write a failing scenario (feature) Write a failing test Make

    your test pass Refactor your code Make your scenario pass BDD TDD
  13. 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