Card 1 of 24 Known: 0 / 24
click to reveal definition
click to flip back
You know 0 of 24 cards in current set.

Ready to get certified?

Get Certified

Need this expertise applied inside your organization?

Explore Our Services

Full Glossary

Foundations

Test-Driven Development (TDD)
A practice of writing an automated test before the code that makes it pass, driving design and building quality in.
Why TDD
TDD produces well-tested, well-designed code, fast feedback, and confidence to change code safely.
Test-First Mindset
Defining how you will know code works before writing it, which clarifies intent and design.
Hands-On Practice
TDD is a skill best learned by doing; the workshop centers on repeated practice with feedback.

The Cycle

Red-Green-Refactor
The TDD cycle: write a failing test (red), make it pass simply (green), then improve the design (refactor).
Red
Writing a small failing test that specifies the next bit of desired behavior.
Green
Writing the simplest code that makes the test pass, even if imperfect.
Refactor
Improving the code's structure without changing behavior, with tests ensuring safety.
Small Steps
Working in tiny increments so feedback is immediate and mistakes are easy to spot.

Unit Testing

Unit Test
An automated test that verifies a small piece of code in isolation.
Arrange-Act-Assert
A structure for tests: set up context, perform the action, then assert the expected result.
Assertions
Statements that check whether the code produced the expected outcome.
Test Isolation
Keeping tests independent so they can run in any order and pinpoint failures.
Test Doubles
Stubs, mocks, and fakes that stand in for dependencies to test code in isolation.

Design

Emergent Design
Letting design evolve through refactoring as tests drive out the needed behavior.
Testable Design
Structuring code with clear responsibilities and dependencies so it is easy to test.
Refactoring Safely
Improving code with confidence because passing tests catch regressions.
Code Smells
Signs of poor design — duplication, long methods, tight coupling — that refactoring addresses.

Quality

Fast Feedback
Running tests frequently to catch problems immediately.
Regression Safety
A growing suite of tests that guards against breaking existing behavior.
Continuous Integration
Frequently integrating and running tests so the codebase stays healthy.

Applying It

TDD Discipline
Consistently following the cycle to gain its benefits, which the workshop helps ingrain.
Common Pitfalls
Writing tests after code, testing too much at once, or skipping refactoring undermine TDD.
TDD and Legacy Code
Introducing tests around existing code to enable safe change over time.
Get started with ICON, today.
Book a consultation