ECE444-F2022-Lab6

Activity 2

Url of Unit Test Function #1 : https://github.com/camillebruckmann/ECE444-Group4-EP/blob/main/Education_Pathways/tests/test_app.py#L33-L39

Url of Unit Test Function #2 : https://github.com/camillebruckmann/ECE444-Group4-EP/blob/main/Education_Pathways/tests/test_app.py#L40-L46

Url of Unit Test Function #3 : https://github.com/camillebruckmann/ECE444-Group4-EP/blob/main/Education_Pathways/tests/test_app.py#L47-L53

Activity 3

Pros and Cons of TDD

The first advantage of using TDD is that it results in modular design of code since you write small tests which lets you check small features separately. Modularized code also enforces good architecture design. Secondly, since the code is modularized, it is easier to maintain. Any time there is an error in the code, the tests will fail which will make the error easier to detect. Thirdly, TDD also makes it easier to document the code since all parts/features of the code have their own tests. This makes it easier for developers to know what each part of the code means. Fourthly, it is time-efficient because debugging time decreases due to there being a written test for every feature. Additionally, there is high test coverage since every feature has a test. TDD also helps in making the code clean since developers will have to understand project/system requirements before writing the code. Moreover, since all features will have their respective tests, the resulting code will be precise and simple.

The disadvantages of TDD are that there can be redundant tests or tests in large quantities. This makes it essential to maintain tests, especially if the project requirements or features change. The second disadvantage is that using TDD at the start of the project may slow down development speed since developers will have to write the test code first before the code for implementing project features. The third con of TDD is that the process is time-consuming since tests take time to write. Fourthly, the entire team must be committed to using TDD and should be knowledgeable and aware of the maintenance of unit tests. There is also a learning curve with TDD so developers should be committed to learning TDD and how to write efficient unit tests since it helps reduce code development time in the long run.