Browse Source

new entry for 9th

master fetched-on-2024-01-14
TheUltimateOptimist 12 months ago
parent
commit
482881cc59
  1. 18
      Lerntagebuch.md

18
Lerntagebuch.md

@ -225,4 +225,20 @@ The testing pyramid consists of four levels. The closer to the ground the level
For the group project we can keep in mind that in order to write proper unit tests we need to follow clean code best practices. Otherwise the code can be come difficult to test as the isolation of different units gets impossible. Programming against apis and avoiding instantiating the needed dependencies is part of the way to testable code.
### repetition
Unit tests have to be independent. As a result, there shall be not state spanning across multiple tests. The order of execution should never matter for unit tests. Every unit test can basically be seen as its own program.
Unit tests have to be independent. As a result, there shall be not state spanning across multiple tests. The order of execution should never matter for unit tests. Every unit test can basically be seen as its own program.
## lecture 9th January 2024
### takeaway
- which tests to automate
- FIRST RTFM
- most automated tests are unit tests
- can be created using test driven development
- TDD leads to 100% requirements coverage
- red green refactor
### perception
For the group project we can try to use test driven development. Paired with committing after pleasing a requirement or completing a refactoring step we can adhere to clean commits. This will ensure a testable architecture and a good git history.
### repetition
Code coverage is bad as a key performance indicator as there can be pieces of code for which tests are not needed. Enforcing 100% code coverage as a result will lead to irrelevant tests that worsen the maintainability of the project. Test driven development does not lead to 100% code coverage. However it leads to 100% requirements coverage.
Loading…
Cancel
Save