diff --git a/Lerntagebuch.md b/Lerntagebuch.md index 284f6d1..592bb48 100644 --- a/Lerntagebuch.md +++ b/Lerntagebuch.md @@ -208,4 +208,21 @@ The waterfall way of managing a project works by going through every step just o For the group project we can keep the psychological aspects of testing in mind. It is hard to find you own mistakes. Therefore we can test each others' code. Also reporting bugs in a predefined way can help avoid personal conflicts. ### repetition -The testing pyramid consists of four levels. The closer to the ground the level the cheaper tests of that category are and the more you should have of them. At the bottom are unit tests, above that component or contract tests followed by integration tests with gui or end to end tests at the top. \ No newline at end of file +The testing pyramid consists of four levels. The closer to the ground the level the cheaper tests of that category are and the more you should have of them. At the bottom are unit tests, above that component or contract tests followed by integration tests with gui or end to end tests at the top. + +## lecture 19th December 2023 + +### takeaway +- reasons for automated tests +- environment needs to support it +- application/module tests vs unit tests +- unit tests -> executable documentation preventing unwanted changes +- FIRST RTFM +- following clean code rules makes writing unit tests easier +- stub vs fake vs mock + +### perception +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. \ No newline at end of file