Shyam-Sundar-Bharathi / cse210-tinyfoot-team14

MIT License
0 stars 0 forks source link

004-ADR-Integrate-Automated-Testing-into-Development-Process #4

Open Shyam-Sundar-Bharathi opened 3 days ago

Shyam-Sundar-Bharathi commented 3 days ago

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

  1. Implement a structured testing strategy with unit tests, integration tests, and end-to-end tests.
  2. Maintain the current ad-hoc testing practices without formal integration.
  3. Adopt a single type of testing (e.g., only unit tests) while ignoring integration and E2E tests.

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)

shouhardik commented 3 days ago

An important ADR. We can also check code coverage percentage to increase reliability of our code.

MitchelHsu commented 3 days ago

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.