Unit Testing: From Zero to TDD

Learn to write unit tests and adopt TDD in your workflow.

Danrley's avatar
Danrley

Unit tests are the foundation of reliable software.

Principles

  • Fast - Quick to execute
  • Independent - No dependencies between them
  • Repeatable - Same result always
  • Self-validating - Automatic pass/fail
  • Timely - Written at the right time

Tools

  • Python: pytest
  • JavaScript: Jest
  • .NET: xUnit
  • Java: JUnit 5

Did you enjoy this article?

Share it with your friends and help spread knowledge!