why automated testing matters to devops
TRANSCRIPT
![Page 2: Why Automated Testing Matters To DevOps](https://reader033.vdocuments.mx/reader033/viewer/2022052514/58845ac31a28ab903b8b6f9b/html5/thumbnails/2.jpg)
What is your worst experience with automated testing?
![Page 3: Why Automated Testing Matters To DevOps](https://reader033.vdocuments.mx/reader033/viewer/2022052514/58845ac31a28ab903b8b6f9b/html5/thumbnails/3.jpg)
What is automated testing?
![Page 4: Why Automated Testing Matters To DevOps](https://reader033.vdocuments.mx/reader033/viewer/2022052514/58845ac31a28ab903b8b6f9b/html5/thumbnails/4.jpg)
Automated Testing:
A process that stimulates a system&
reports whether expectations are met
![Page 5: Why Automated Testing Matters To DevOps](https://reader033.vdocuments.mx/reader033/viewer/2022052514/58845ac31a28ab903b8b6f9b/html5/thumbnails/5.jpg)
Types of Automated Testing
![Page 6: Why Automated Testing Matters To DevOps](https://reader033.vdocuments.mx/reader033/viewer/2022052514/58845ac31a28ab903b8b6f9b/html5/thumbnails/6.jpg)
Unit Tests
• Written by developers• Intimate with code under test• ONLY interact with unit under test • Mock everything else• May influence design• May expose design concerns• Run FAST (hundreds in secs on dev machine)
![Page 7: Why Automated Testing Matters To DevOps](https://reader033.vdocuments.mx/reader033/viewer/2022052514/58845ac31a28ab903b8b6f9b/html5/thumbnails/7.jpg)
Unit Tests
Unit
Test
Test
Mock
Mock
![Page 8: Why Automated Testing Matters To DevOps](https://reader033.vdocuments.mx/reader033/viewer/2022052514/58845ac31a28ab903b8b6f9b/html5/thumbnails/8.jpg)
Integration Tests
• Intimate with code under test• May or may not interact with other systems• May use mocks, simulators, scaffolding• May influence design• May expose separation of concerns• May or may not run on Dev machines• May be fast or slow• May or may not encapsulate a user function
![Page 9: Why Automated Testing Matters To DevOps](https://reader033.vdocuments.mx/reader033/viewer/2022052514/58845ac31a28ab903b8b6f9b/html5/thumbnails/9.jpg)
Integration TestsSystem Under Test (SUT)
Component A
Component C Component D
Component B
![Page 10: Why Automated Testing Matters To DevOps](https://reader033.vdocuments.mx/reader033/viewer/2022052514/58845ac31a28ab903b8b6f9b/html5/thumbnails/10.jpg)
Integration Tests - Example 1System Under Test (SUT)
Reporting Service
Authentication Broker
Parsing Service
![Page 11: Why Automated Testing Matters To DevOps](https://reader033.vdocuments.mx/reader033/viewer/2022052514/58845ac31a28ab903b8b6f9b/html5/thumbnails/11.jpg)
Integration Tests - Example 2System Under Test (SUT)
Restful Server
User Interface
Database
Request
![Page 12: Why Automated Testing Matters To DevOps](https://reader033.vdocuments.mx/reader033/viewer/2022052514/58845ac31a28ab903b8b6f9b/html5/thumbnails/12.jpg)
End to End (E2E) Tests
• Interacts with System as an “Actor” would• Assumes similar environment to production• May or may not run on Dev machines• Hopefully fast, usually slow (minutes & hours)
![Page 13: Why Automated Testing Matters To DevOps](https://reader033.vdocuments.mx/reader033/viewer/2022052514/58845ac31a28ab903b8b6f9b/html5/thumbnails/13.jpg)
End to End (E2E) Tests
![Page 14: Why Automated Testing Matters To DevOps](https://reader033.vdocuments.mx/reader033/viewer/2022052514/58845ac31a28ab903b8b6f9b/html5/thumbnails/14.jpg)
What does bad automated testing look like?
![Page 15: Why Automated Testing Matters To DevOps](https://reader033.vdocuments.mx/reader033/viewer/2022052514/58845ac31a28ab903b8b6f9b/html5/thumbnails/15.jpg)
Bad Automated Testing
Causes unexpected work, like…– “You filled up the disk”– “The network was flooded”– Data leaks– Tests fail because of poor design– Cascading failures– Numerous false positives– Inconsistent results
![Page 16: Why Automated Testing Matters To DevOps](https://reader033.vdocuments.mx/reader033/viewer/2022052514/58845ac31a28ab903b8b6f9b/html5/thumbnails/16.jpg)
What does good automated testing accomplish, how is it different?
![Page 17: Why Automated Testing Matters To DevOps](https://reader033.vdocuments.mx/reader033/viewer/2022052514/58845ac31a28ab903b8b6f9b/html5/thumbnails/17.jpg)
Good Automated Tests…Expedite work, like…• “The tests showed me where to look”• Expose error states
– java.lang.StackOverflowError (bad recursion)• High signal-to-noise ratio
– No cascading, except in serious cases– Few false positives
• Act as or establish a “Source of Truth”– Tests fail here, but not there– Tests fail with this data, but not that data
• Isolate problem scope
![Page 18: Why Automated Testing Matters To DevOps](https://reader033.vdocuments.mx/reader033/viewer/2022052514/58845ac31a28ab903b8b6f9b/html5/thumbnails/18.jpg)
Good Automated Tests…
Smooth edges via friction
Friction:• Failing tests• Failing systems• Identifying system limits• Forcing consideration of constraints, scenarios, cases
Smoothed:• Pronounce or expose implied contracts
![Page 19: Why Automated Testing Matters To DevOps](https://reader033.vdocuments.mx/reader033/viewer/2022052514/58845ac31a28ab903b8b6f9b/html5/thumbnails/19.jpg)
How does this affect you?
![Page 20: Why Automated Testing Matters To DevOps](https://reader033.vdocuments.mx/reader033/viewer/2022052514/58845ac31a28ab903b8b6f9b/html5/thumbnails/20.jpg)
Follow the Value
• Your role is, was, or is projected to be valuable to someone somewhere
• Someone has decided:– Consumers won’t buy without your role OR– To speculate that value is increased by your role
![Page 21: Why Automated Testing Matters To DevOps](https://reader033.vdocuments.mx/reader033/viewer/2022052514/58845ac31a28ab903b8b6f9b/html5/thumbnails/21.jpg)
Passing the Value
The person who understands your value may not be the person who makes decisions
Or
The person who understands your value may not communicate it in a way that benefits you
![Page 22: Why Automated Testing Matters To DevOps](https://reader033.vdocuments.mx/reader033/viewer/2022052514/58845ac31a28ab903b8b6f9b/html5/thumbnails/22.jpg)
If your value is obscured…
You go home!
![Page 23: Why Automated Testing Matters To DevOps](https://reader033.vdocuments.mx/reader033/viewer/2022052514/58845ac31a28ab903b8b6f9b/html5/thumbnails/23.jpg)
…So Increase & Promote Value
• By using what you have:– Tests– Code– Systems– Communication
• By digging deeper:– Peers– Customer– Investor– Manager
![Page 24: Why Automated Testing Matters To DevOps](https://reader033.vdocuments.mx/reader033/viewer/2022052514/58845ac31a28ab903b8b6f9b/html5/thumbnails/24.jpg)
Checks and Balances
• The code serves as a test case for the test• The code serves as a test case for the deployment
• The tests serve as tests for the code• The tests serve as tests for the deployment
• The deployment serves as a test for the code• The deployment serves as a test for the tests
![Page 25: Why Automated Testing Matters To DevOps](https://reader033.vdocuments.mx/reader033/viewer/2022052514/58845ac31a28ab903b8b6f9b/html5/thumbnails/25.jpg)
Checks and Balances
• Each touch-point presents opportunity for greater value through:– Efficiencies– Effectiveness– Goodwill– Making life easier for someone • Customer? • Investor?• User?• Peer?
![Page 26: Why Automated Testing Matters To DevOps](https://reader033.vdocuments.mx/reader033/viewer/2022052514/58845ac31a28ab903b8b6f9b/html5/thumbnails/26.jpg)
Creating Value via DevOps Role
• Use friction to create value• What is a failing (or passing) test telling you?• How can you create a better system based on
feedback (like that from automated tests)?
![Page 27: Why Automated Testing Matters To DevOps](https://reader033.vdocuments.mx/reader033/viewer/2022052514/58845ac31a28ab903b8b6f9b/html5/thumbnails/27.jpg)
“Release”
The act of coding, testing & deploying
![Page 28: Why Automated Testing Matters To DevOps](https://reader033.vdocuments.mx/reader033/viewer/2022052514/58845ac31a28ab903b8b6f9b/html5/thumbnails/28.jpg)
A Release Serves as…
• A test of the market• A test of the customer• A test of the business (or business line)• A test of the investment• A collector of revenue (fuels the business)• A test of your role’s value
![Page 29: Why Automated Testing Matters To DevOps](https://reader033.vdocuments.mx/reader033/viewer/2022052514/58845ac31a28ab903b8b6f9b/html5/thumbnails/29.jpg)
• Automated Tests• Deployments as Tests• Code as Tests• Releases as Tests
Each giving feedback you are uniquely positioned to leverage to create value for the
business.
Tests…
![Page 30: Why Automated Testing Matters To DevOps](https://reader033.vdocuments.mx/reader033/viewer/2022052514/58845ac31a28ab903b8b6f9b/html5/thumbnails/30.jpg)
Any test could be a pain in your ____ OR
It could be an opportunity to create value in your systems and lines of business!