uprm-inso4117-2023-2024-s2 / semester-project-uprmarketplace

semester-project-uprmarketplace created by GitHub Classroom
0 stars 0 forks source link

[Lecture Topic Task] Implement TDD #124

Open BreannaGSegarra opened 5 months ago

BreannaGSegarra commented 5 months ago

Implement TDD, which has the following specifications:

  1. The team documents some examples of applying TDD. Their examples present an initial, formal or informal specification of a unit (e.g. function). They then present a first, minimal test capturing some aspect of the specification together with a dummy implementation (a stub) that fails the test, to then modify the implementation so it passes the test. This is repeated for at least a total of 5 tests (thereby building up a test suite) each time changing the implementation so it then passes the new test in addition to the existing tests.
  2. Tests are chosen in a plausible way: a developer could plausibly come up with the test shown as a first, second, third,… test. For example, a first test for a square root function could be "sqrt must return a positive value" or alternatively "sqrt of 4 must be very close to 2".
  3. The team can use any unit testing tool that they want.

Recommended Difficulty: 4 Recommended Urgency: 5