Preface
- Purpose of the book
- What is unique about this book?
- Who the book is for?
- Send me feedback
Introduction
- Continuous Integration (CI)
- Continuous Delivery and CI/CD
- Who does “CI/CD”?
- 80+% of CI/CD effort is about Test Automation
- Continuous Testing
No Real Delivery
- Anti-Pattern: Unclear on delivery destination
- Anti-Pattern: Fear to deploy to a test-ready environment
- Anti-Pattern: Auto production deployment
- Anti-Pattern: CI/CD is disconnected from production releases
- Wrap-up
Non-Testing CI Steps
- Anti-Pattern: Not fully-automated CI steps
- Anti-Pattern: Manual database schema migration
- Anti-Pattern: CI Engineers lack automation skills
- Anti-Pattern: Slow compile/build/package
- Anti-Pattern: Fixated with code coverage
- Anti-Pattern: No auto-deployment to internal server environments
- Anti-Pattern: Lack of notification to the team about CI/CD build results
Test Automation is the Core of CI/CD
- Anti-Pattern: No Automated Testing in CI
- Anti-Pattern: Automated Test Execution Not Enabled in CI
- Anti-Pattern: Remove failed automated tests to pass the run
- Anti-Pattern: Long-Running Unit Tests in CI
- Anti-Pattern: Frequent Unit Test Failures in CI
- Anti-Pattern: Long-Running Integration Tests in CI
- Anti-Pattern: Automated Tests Not Run Often in CI
- Anti-Pattern: No Regression Testing in CI/CD
- Wrap-up
E2E Test Automation
- Anti-Pattern: No Automated Acceptance Testing in CI/CD
- Anti-Pattern: Sequential Executing E2E Tests in CI/CD
- Anti-Pattern: Avoid Running the Entire Suite—Split It into Smaller Suites
- Anti-Pattern: Prioritizing Tests in Execution
- Anti-Pattern: Fake Automated Acceptance Testing
- Anti-Pattern: E2E Test Scripts are Not in an Independent Git Repository
- Anti-Pattern: Headless Browser Testing
- Anti-Pattern: Long execution time > 1 hour
- Anti-Pattern: Parallel Execution on one machine
- Wrap-up
CT Features Missing in Most CI/CD Servers
- View Test Scripts in the CT Server Web Interface
- Capture Application Screenshots on E2E Test Failure
- Quick navigation to the failed test line
- Auto-Retry Failed E2E Test on Another Build Agent
- Manually Rerun Tests
- Dynamic Test Execution Ordering
- Distribution rules
- Delay completion
- Anti-Pattern: Being constrained by a vendor’s CI/CD server limitations and do nothing
- Wrap-up
Mindset
- Anti-Pattern: “Test Automation in CI Slows Down Development”
- Anti-Pattern: “Prefer expensive commercial CI/CD solutions over free open-source ones”
- Anti-Pattern: “API Testing as E2E Test Automation in CI/CD is Enough”
- Anti-Pattern: “E2E Test Automation Is Inherently Fragile, Keep Them To a Minimum”
- Anti-Pattern: “E2E Test Automation Is Too Expensive, So we don’t include in CI/CD”
- Anti-Pattern: Assuming Automated Tests Will Always Pass After Creation
- Anti-Pattern: “E2E Test Automation Scripts Must Use the Same Language as the Application Code”
- Anti-Pattern: “Set up a CI/CD Solution Takes a Long Time and Costly”
- Anti-Pattern: Drawn to flashy, smoke-and-mirror features like Test Replay
- Wrap-up
General Practices
- Anti-Pattern: Not the exact the same release package for different target environments.
- Anti-Pattern: Underinvesting in CI/CD Hardware
- Anti-Pattern: Automating the Tear Down and Setup of the CI Servers Daily
- Anti-Pattern: No Admin Access for Developers and Testers in CI/CD
- Anti-Pattern: Only limited to execute one specific type of automated tests in one language
- Anti-Pattern: A Single CI/CD Server Serving the Entire Company/Division
- Anti-Pattern: No Daily Builds
- Anti-Pattern: No incremental version or build number during internal testing
- Anti-Pattern: Commit-Driven CI/CD Triggers
- Anti-Pattern: Sending Real Emails Out During Test execution in CI/CD
Non-Functional Testing
- Anti-Pattern: No Continuous Performance Testing
- Anti-Pattern: No Continuous Load Testing
- Wrap-up
CI/CD Hosting
- Anti-Pattern: Neglecting the Needs of E2E Test Automation
- Anti-Pattern: Falling for flashy but useless features in cloud testing platforms but miss the big picture
- Anti-Pattern: Completely unaware of or blindly exlcuding on-premise Setup
- Wrap-up
Team Involvement
- Execute Individual Tests via the CT Server Web Interface
- Data Preparation for User Acceptance Testing
- Self-help Utilities that whole team can use on the CT Server
- Generate a Traceability Matrix
- Anti-Pattern: Non-Tech Team Members Not Using CI/CD Server
- Anti-Pattern: Only One Run Configuration
- Case Study: A bug-fixing cycle in a team with real CI/CD
- Real CI/CD Boots Customers’ Trust and Confidence in the team
Leadership
- Anti-Pattern: Failing to Recognize the Great Benefits of Real CI/CD
- Anti-Pattern: Lack Team-Wide Training on CI/CD Process
- Anti-Pattern: Developers delay fixing newly discovered defects by Continuous Testing
- Anti-Pattern: Stuck with One CI Vendor or One Person
- Anti-Pattern: Assuming Existing Staff Can Deliver Real CI/CD and E2E Automation with a New Product
- Anti-Pattern: Fixated with All-in-one CI/CD. Two Stage CI → CD Often Better
Afterword
- My CI/CD Formula
- How many E2E Tests in CI/CD are enough?
- My Continuous Testing Lab Setup
Appendix I: Anti-Patterns List
Appendix II: CI Steps
Resources
- Books
- Tools
- Blog