Super Marek's Testing Strategy (LeedsPHP meetup)

Super Marek's Testing Strategy (LeedsPHP meetup)

Talk presented at the LeedsPHP meetup.

2bd48651cd01e0ca2e0a255a63da77aa?s=128

Marek Matulka

May 16, 2018
Tweet

Transcript

  1. 3.
  2. 5.
  3. 7.
  4. 11.

    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
  5. 12.

    Solution Build a footbridge connecting rail platforms. Station building connecting

    all platforms Platform 1 Platform 2/3 Platform 4 Platform 5/6
  6. 13.

    Delivery Footpath connecting rail platforms. Station building connecting all platforms

    Platform 1 Platform 2/3 Platform 4 Platform 5/6 Footbridge
  7. 14.
  8. 17.

    QA

  9. 21.

    Definition of done • Have one • Change it as

    team’s delivery process changes • Have production environment from day one
  10. 22.
  11. 23.

    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
  12. 24.

    Story grooming • Acceptance criteria • Testing strategy ◦ Unit

    tests enough? • Slice into smaller stories • Involve as many people as possible - QA, PO, FE, BE, stakeholders...
  13. 25.

    In development • Test early! ◦ Unit tests ◦ Acceptance

    tests ◦ Integration tests • Peer reviews • Pair programming • CI build on every commit
  14. 26.

    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
  15. 27.

    Monitoring • Logs collection ◦ logstash, papertrail • Bugs detection

    ◦ bugsnag, sentry • Alerts ◦ new relic, sysdig
  16. 29.

    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
  17. 30.

    Write a failing scenario (feature) Write a failing test Make

    your test pass Refactor your code Make your scenario pass BDD TDD
  18. 31.

    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