Closed Shyam-Sundar-Bharathi closed 1 month ago
An important ADR. We can also check code coverage percentage to increase reliability of our code.
I think integration (service) test might be easier to write in this case. Unit tests require a lot of mocking, and might be harder to write, if we want to do it right.
Not feasible within given time frame. ADR05 (as an extension to ADR02) was identified for implementation. Closing issue.
ADR04: Integrate Automated Testing into Development Process
Context and Problem Statement
One major aspect that Bifoot.js lacks a test-suite, making it into a "spaghetti-code" that's unreliable. As the project grows and evolves, ensuring code quality, reliability, and maintainability becomes increasingly important. Test-driven development would enforce the development of a modularised code which can be unit-tested and considered in end-to-end testing.
Automated testing can help catch bugs early, ensure that new features do not break existing functionality, and improve confidence in code changes. To maximize the effectiveness of testing, we must consider the implications for our architectural design and overall workflow.
Decision Drivers
Considered Options
Decision Outcome
Chosen option: "Implement a structured testing strategy with unit tests, integration tests, and end-to-end tests," because it provides a comprehensive approach to improving code quality and reliability. This method ensures that various aspects of the application are tested, facilitating a robust and maintainable codebase.
Consequences
Confirmation
This decision will be confirmed through ongoing assessment of testing effectiveness and code quality metrics. We will measure the impact of automated testing on the development process and gather feedback from the team regarding the new testing practices.
Pros and Cons of Other Options
Maintain the current ad-hoc testing practices
Adopt a single type of testing (e.g., only unit tests)