Software Development Practice : Test-Driven Development
ronysetyawansyah
9 views
12 slides
Oct 14, 2024
Slide 1 of 12
1
2
3
4
5
6
7
8
9
10
11
12
About This Presentation
Test-Driven Development (TDD) is a software development practice where you write tests before writing the actual code. It aims to improve the quality and maintainability of code by following a simple cycle:
Write a Test: Start by writing a test for the next bit of functionality you want to add. Thi...
Test-Driven Development (TDD) is a software development practice where you write tests before writing the actual code. It aims to improve the quality and maintainability of code by following a simple cycle:
Write a Test: Start by writing a test for the next bit of functionality you want to add. This test should be very specific and, initially, it will fail because the functionality doesn’t exist yet.
Write the Code: Write the minimum amount of code necessary to make the test pass. This step focuses on implementing just enough functionality to satisfy the test without adding any extra features or complexity.
Refactor: Once the test passes, you can refactor the code to improve its structure and quality, while ensuring that the functionality remains intact. Refactoring might involve simplifying the code, eliminating redundancies, or improving readability.
Repeat: Continue this cycle, adding more tests and functionality iteratively.
Benefits of TDD
Improves Code Quality: TDD helps catch bugs early because the tests verify that each part of the code works as intended.
Ensures Requirements are Met: Since tests are written based on requirements before the actual code, TDD helps ensure that all specified requirements are covered.
Facilitates Refactoring: With tests already in place, you can refactor code confidently, knowing that any change that breaks existing functionality will be caught by the tests.
Supports Documentation: Tests act as living documentation, showing how different parts of the system are supposed to work.
Size: 1.12 MB
Language: en
Added: Oct 14, 2024
Slides: 12 pages
Slide Content
Digital Talent Incubator Senior Level Software Engineer - International Job Connections
LEARN
Rony Setyawan, S.T., M.Kom.
Test-Driven Development
Software development approach where tests are written before the code itself
Ensuring that the code meets its requirements
Helping to catch bugs early
October-December 2024
Digital Talent Incubator Senior Level Software Engineer - International Job Connections
LEARN
October-December 2024
“Are the teeny-tiny steps feeling restrictive? Take bigger steps. Are
you feeling a little unsure? Take smaller steps. TDD is a steering
process, a little this way, a little that way.” – (Kent Back)
“In general, every time you encounter a testability problem, there is
an underlying design problem.” – (Michael Feathers)
Digital Talent Incubator Senior Level Software Engineer - International Job Connections
LEARN
What is TDD?
October-December 2024
Each Test will cover a single scenario for a single piece of logic.
Digital Talent Incubator Senior Level Software Engineer - International Job Connections
LEARN
TDD Workflow
October-December 2024
Digital Talent Incubator Senior Level Software Engineer - International Job Connections
LEARN
TDD in Agile
October-December 2024
Digital Talent Incubator Senior Level Software Engineer - International Job Connections
LEARN
TDD Flow in Agile
October-December 2024
Digital Talent Incubator Senior Level Software Engineer - International Job Connections
LEARN
Benefits of TDD
October-December 2024
Digital Talent Incubator Senior Level Software Engineer - International Job Connections
LEARN
Benefits of TDD
October-December 2024
Digital Talent Incubator Senior Level Software Engineer - International Job Connections
LEARN
Traditional VS TDD
October-December 2024
Digital Talent Incubator Senior Level Software Engineer - International Job Connections
LEARN
TDD Best Practices?
October-December 2024
Digital Talent Incubator Senior Level Software Engineer - International Job Connections
LEARN
TDD Tools
October-December 2024
Digital Talent Incubator Senior Level Software Engineer - International Job Connections
LEARN
October-December 2024
Nothing makes code more flexible and maintainable than having a
suite of tests by a huge order of magnitude.” – (Uncle Bob)
“Test-driven development and continuous refactoring, two of the
many excellent XP practices, have dramatically improved the way I
build software.” – (Joshua Kerievsky)