@ -426,3 +426,37 @@ Errors can have a significant impact on software systems. They can cause softwar
### Feedback
---
## SU 09 (09.01.2024)
### Takeaway
**Test Driven Development**
- Motivation:
- Quality costs: The cost of fixing bugs increases with the age of the code.
- Which tests to automate?: Unit tests should be written for all public methods and classes.
- How to write a good unit test?: A good unit test is independent, repeatable, complete, accurate, and up-to-date.
- What does "trustworthy" mean?: A trustworthy unit test is reliable and provides reliable results.
- Timely: Unit tests should be written as early as possible to detect bugs early.
- Conclusion: Unit tests are the most frequently automated tests, and Test-Driven Development (TDD) is the most suitable approach for their creation.
- Fundamentals:
- Test coverage: Test coverage is a measure of how much code is covered by tests.
- Approach: The approach to software testing can be divided into different phases, such as the phases of planning, execution, and evaluation.
- TDD micro cycle: The TDD micro cycle is an iterative approach to writing unit tests.
### Perception
I can apply TDD to my group project by first writing a test case for the desired functionality. Then, I implement the code that should pass the test case. Finally, I refactor the code to improve its structure and maintainability.
This iterative process helps me to detect and fix bugs early. It also leads to cleaner and more maintainable code, which is easier for other developers to understand and maintain.
### Repetition
**TDD Micro Cycle**
The TDD Micro Cycle is a three-step process used in Test-Driven Development (TDD) methodology. It involves writing a test, implementing code to pass the test, and refactoring the code to improve its structure and maintainability. This iterative process helps in early detection and correction of bugs, leading to cleaner and more stable code.