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

Testing in Production: Dangerous, scary or better?

JonHW
April 11, 2017

Testing in Production: Dangerous, scary or better?

We all run tests on safe, separate test environments. But what if let them loose on production systems? Is that dangerous, or is it worth the risk? This can seem daunting, but there are huge benefits. I’ll discuss some of the downsides to testing in isolated, unrepresentative test environments, before talking about my experiences of using Selenium to test in production as much as possible. I’ll demonstrate the benefits, like how we can turn automated tests into monitoring and early alerting systems for our production environments, and the steps we need to take to make sure our production tests don’t affect our users.

JonHW

April 11, 2017
Tweet

More Decks by JonHW

Other Decks in Technology

Transcript

  1. @jonhw87 2 Testing in Production: Dangerous, scary or better w

    • What is it? • Why? • What are the challenges? • Taking it further - an example • Lessons learnt
  2. @jonhw87 3 Testing in Production: Dangerous, scary or better Traditional

    flow Develop Test Deploy Check LOCAL Test / staging PRODUCTION ???
  3. @jonhw87 5 Testing in Production: Dangerous, scary or better w

    Test environments allow us to: • Make a mess… • And not clear it up • Test before live • Have total control
  4. @jonhw87 6 Testing in Production: Dangerous, scary or better w

    Test environments can also be: • Maintenance heavy • Lower priority than prod • Isolated • Inaccurate
  5. @jonhw87 7 Testing in Production: Dangerous, scary or better Traditional

    flow Develop Test Deploy Check LOCAL Test / staging PRODUCTION ???
  6. @jonhw87 8 Testing in Production: Dangerous, scary or better w

    Monitoring What it can What it can’t API / HTTP responses Integrated user journey Machine status Traffic levels Crash reporting
  7. @jonhw87 11 Testing in Production: Dangerous, scary or better w

    Fears for testing in production: • What if users notice? ◦ A test while it’s running ◦ Test data ◦ Test residue ◦ Other evidence of test activity
  8. @jonhw87 17 Testing in Production: Dangerous, scary or better w

    The tests: • Create a piece of content • Follow it through the entire stack • Take down the content • Confirm through the stack
  9. @jonhw87 19 Testing in Production: Dangerous, scary or better w

    The challenges: • Hiding test content • The tests • Continual running • Visibility of results
  10. @jonhw87 29 Testing in Production: Dangerous, scary or better w

    Benefits: • Better awareness • Easier & faster investigation • Use beyond the team
  11. @jonhw87 30 Testing in Production: Dangerous, scary or better w

    Lessons learnt • Not scary • Not dangerous • Better?
  12. @jonhw87 32 Testing in Production: Dangerous, scary or better w

    If you want to do this: • Business critical flows / functions • Hide it! • Traditional flow vs monitoring