In this repository, I have replayed the example from https://github.com/mjhea0/flaskr-tdd#login-required
Here are the test functions that I added to my group project:
- https://github.com/ECE444-2023Fall/project-1-web-application-design-group11-webwizards/blob/backend-crud-calls-for-user-accounts/backend/tests/test_user_routes.py#L13-L21
- https://github.com/ECE444-2023Fall/project-1-web-application-design-group11-webwizards/blob/backend-crud-calls-for-user-accounts/backend/tests/test_user_routes.py#L24-L32
- https://github.com/ECE444-2023Fall/project-1-web-application-design-group11-webwizards/blob/backend-crud-calls-for-user-accounts/backend/tests/test_user_routes.py#L34-L37
Test driven development (TDD) is a method of coding where programmers write tests before implementing code. There are many pros and cons to TDD.
- TDD helps everyone in a team set expectations for how they expect a feature/function to behave before it is implemented (everyone is on the same page)
- TDD allows for better collaboration when implementing code since the tests set clear expectations
- TDD ensures that the testing process is not rushed (since tests are designed before code is implemented)
- TDD often involves a test for each feature, which results in more reliable code
- TDD works well with the Agile method, as both are iterative processes
- TDD may slow the development process, as tests need to be written for all features (even if the implementation is relatively straightforward)
- If requirements change throughout the development process, the tests will need to be updated - this may take up extra time
- TDD doesn't work well with the Waterfall method, which is a sequential model