diff --git a/chapters/software-tests.md b/chapters/software-tests.md index a6b596fc35e82aeea74e9aa6e329422d6da876d1..2f3f21f52006e0f48bf04c027fed7075d43dd205 100644 --- a/chapters/software-tests.md +++ b/chapters/software-tests.md @@ -1,13 +1,13 @@ ## Software Tests -All functions (except getter and setter methods) `MUST` provide proper tests. -This is understood on a component level, meaning every method should have at least one test. -Whether you achieve this by Test Driven Development (TDD) or other means depends on your preferred way to work. +Software tests aim at ensuring that the code you write does exactly what you expect it to do. + +All functions (except `get`ter and `set`ter methods) `MUST` provide proper tests. +Every method should have enough tests to cover each line of code, aiming at a code coverage of 100\%. +Also all possible outcomes of a method should be considered and covered by tests. -Please keep in mind not only to write a test for each of your functions but also -consider all possible outcomes. -It is e.g. not sufficient to test if a function creates a file if the written content depends on variables etc. +Whether you achieve this by Test Driven Development (TDD) or other means depends on your preferred way to work. Examples for writing tests in different programming languages are: