Skip to main content

Continuous Integration/Continuous Deployment

Traditional “Waterfall” Testing Practices

In the Waterfall model, software development follows a sequential process. Testing typically occurs toward the end of the project.

Characteristics:

  • Late-stage testing: After development and design are completed
  • Long planning phase: Requires lead time for test case design and environment setup
  • Stable requirements: Test cases rarely change once tied to fixed requirements
  • Low flexibility: Few updates after system specifications are locked
  • Periodic testing: Initial test to confirm requirements, followed by regression testing after changes

Downsides:

  • Late bug discovery
  • Expensive fixes
  • Long feedback loop

Agile Testing & Continuous Integration

Unlike Waterfall, Agile encourages early and continuous testing throughout development.

Continuous Integration (CI)

“CI is a software development practice where team members integrate work frequently, ideally multiple times per day. Each integration is verified by an automated build (including tests) to detect errors quickly.” — Martin Fowler

Martin Fowler on CI


CI Process in Agile

  1. A developer completes a feature
  2. Code is tested and packaged locally
  3. Code is pushed to the shared repository
  4. Automated build & test runs to verify integration
  5. If errors arise, conflicts are fixed and the process repeats
  6. Application is always in a deployable state

Why Use CI?

  • Faster feature delivery
  • Automated build and test
  • Real-time feedback on build/test status
  • Immediate bug detection
  • Ensures a working version of software at any point
  • Maintains full project version history

Key Steps in CI

Each time code is committed:

  • Integrate: Merge all changes to main branch
  • Build: Compile into executables or packages
  • Test: Run unit, integration, and regression tests
  • Archive: Store versioned build artifacts
  • Deploy: Automatically push to a testing/staging environment

Fowler’s 10 Best Practices for CI

  1. Maintain a Single Source Repository
  2. Automate the Build
  3. Make Your Build Self-Testing
  4. Everyone Commits to the Mainline Every Day
  5. Every Commit Should Build on the Integration Machine
  6. Keep the Build Fast
  7. Test in a Clone of the Production Environment
  8. Make It Easy to Get the Latest Executable
  9. Everyone Can See What’s Happening
  10. Automate Deployment

Fowler’s Full Text on Best Practices


CI Tools

Many modern tools help implement CI pipelines effectively. Popular CI tools include:

  • Jenkins
  • Travis CI
  • GitHub Actions
  • CircleCI
  • GitLab CI/CD
  • Bamboo

🔗 Atlassian CI Tool Comparison


Continuous Delivery vs Continuous Deployment

TermDescription
Continuous DeliveryEvery change that passes tests is ready for release, but manual approval may be required
Continuous DeploymentEvery passing change is automatically deployed to production without manual intervention

🔗 CI vs Delivery vs Deployment


Development Lifecycle With CI

Feature Dev -> Local Build/Test -> Push to Repo -> CI System Triggers ->
Build & Automated Tests -> Deploy to Staging -> Review & Merge -> Delivery/Deployment

This process repeats for each feature, keeping the application stable and deployable at all times.


Summary

  • CI/CD helps maintain a high-quality, deployable product throughout development
  • Agile methodology aligns with CI principles by encouraging frequent integration
  • Automated builds and tests help catch bugs early
  • Fowler’s best practices guide an efficient CI pipeline
  • CI tools streamline this process across teams and platforms

Disclaimer: Generative AI was used in part to generate these lecture notes.