Skip to content

Test Driven Development (TDD)

What are we trying to accomplish?

In this lesson, students are introduced to Test Driven Development (TDD) as both a mindset and a professional development workflow. Rather than treating testing as an afterthought, students will learn how tests can drive design decisions, clarify requirements, and protect codebases as they grow.

By working with Pytest (Python) and Jest (JavaScript), students will see how the same TDD principles apply across languages and ecosystems. Emphasis is placed on understanding why TDD exists, how it improves software quality, and where it fits into modern development practices such as containerization and CI/CD pipelines.


Lectures & Assignments

Lectures

Assignments


Enabling Learning Objectives (ELO's)

  • Explain what Test Driven Development (TDD) is and describe the Red–Green–Refactor cycle
  • Articulate the benefits of writing tests before implementation
  • Compare testing approaches across Python (Pytest) and JavaScript (Jest)
  • Understand how test files are discovered and organized in each framework
  • Interpret test output, error messages, and assertion failures
  • Explain why containerized test execution is valuable in professional environments
  • Describe how automated testing fits into CI/CD pipelines

Terminal Learning Objectives (TLO's)

  • Write unit tests using Pytest and Jest
  • Follow proper test naming and organization conventions
  • Use assertions to validate expected behavior
  • Run test suites from the command line
  • Debug failing tests and resolve common testing errors
  • Export and import code correctly for testability
  • Build and run Docker containers that execute test suites as one-off commands
  • Verify test results via terminal output and exit codes