Engineering Practices for Continuous Delivery: From Metrics and Deployment Pipelines to Integration and Microservices with Neal Ford Testing Practices
Testing Audience Effort Feedback
Testing quadrants functional acceptance showcases usability business facing functional acceptance automated showcases usability exploratory manual unit nonfunctional acceptance quality of service manual / automated integration support programming critique project technology facing source: Brian Marrick, Continuous Delivery (Humble/Farley), with modifications
Fast/Slow Tests unit tests functional tests fast one test <= 30 ms all tests < 10 minutes never reach out for process stub everything (db, ws, ...) audience: developer slow (not a requirement) never stub anything audience: architect?
Integration Tests contracts heartbeats plumbing
Functional Acceptance Testing verify that the project matches its requirements in many cases a DSL FIT/FITnesse, RSpec, easyb, spock, Cucumber writes a wiki in English BA/SME translates to a fixtures wiki/gurken functional test fixture needs to fix fixtures integrate fixtures in CI/CD developer Business Analysts Small Matter Experts
Two Styles of Functional Testing Everything below the UI Everything including UI Domain Logic (Model) Persistence (OR Mapper) Storage External Endpoints Externals behind Firewall Not Cucumber Eg. Selenium
To Cuke or not to Cuke BDD is not a silver bullet How much extra time should I budget on my project to accommodate all the extra typing that I am doing for my unit tests? Zero! Less time spent in the debugger BDD does take extra time for the mapping of wikis to fixtures to tests https://www.thoughtworks.com/insights/blog/3-misconceptions-about-bdd BDD = Behavior driven Development https://www.thoughtworks.com/insights/blog/3-misconceptions-about-bdd
Testing Ratios Succeeding with Agile (Mike Cohn) GUI Functional Unit Tests
Testing Ratios Ideal Software Testing Pyramid (watirmelon.com) Manual Session Based Testing GUI Functional API Tests Integration Tests Component Tests Unit Tests
Anti-Pattern: Ice-Cream Cone Manual Tests Automated GUI Tests Integration Tests Unit Tests
Cupcake Anti-pattern Same amount of Manual tests Automated GUI tests Automated Integration Tests (API, Contract, Component) Automated Unit Tests Reason is usually silos/firewalls between roles www.thoughtworks.com/insights/blog/introducing-software-testing-cupcake-anti-pattern
Avoiding Cupcakes Collaborate Test at the lowest level Work in sync Cross-role pair programming Story kickoff Test at the lowest level Merge teams when possible Agree on goals and metrics
Prefer journeys to stories Do not map every story to a new test Stories that enhance on stories should lead to an update of the old test