re: BDD rather than TDD: Result-Oriented Testing VIEW POST


Thanks for sharing your take with BDD!

I totally agree with you about not relying on low-level or higher-level unit tests... what matters is that the tests check X feature is actually working.

Actually, I do some cheating in some parts that my BDD tests sometimes look like:

  1. Typical unit test, like checking the (200 OK, 403 Forbidden) responses from my endpoints as in here:

  2. Low-level unit test. Since, sometimes I have to check how the function behaves under different scenarios.
    E.g: checking create_review function and checking the date (and freezing at a specific point of time):

  3. Integrated test. Like what I did when I tested uploading photos via API:

I used a real photo file cuz I have to check if hitting that endpoint is gonna ACTUALLY upload it in my media folder.

code of conduct - report abuse