Post AdP1n03evoKnZ4dmca by agateau@mastodon.xyz
 (DIR) More posts by agateau@mastodon.xyz
 (DIR) Post #AdP1n03evoKnZ4dmca by agateau@mastodon.xyz
       2024-01-01T13:02:31Z
       
       0 likes, 0 repeats
       
       Interesting article from Kent Beck about TDD.https://tidyfirst.substack.com/p/canon-tddI like the idea of writing a list of test scenarios before implementing them. This way tests sound more like specifications that are not out of touch with reality.I also like that it does not mention anything about the type of tests, as I find it more useful to write integration tests for new features than a gazillion unit tests.
       
 (DIR) Post #AdP9JzqJS5cQ8H4xdo by maco@wandering.shop
       2024-01-01T14:26:53Z
       
       0 likes, 0 repeats
       
       @agateau I find it impossible to write correct integration tests without code. There is no way I will get all the mocking right just from my head. I need to experiment back and forth between the code, hands-on testing with prints, and the automated test as I discover exactly what the AWS library is expected to return in that function call so I can mock it. Or the requests library. Or myriad other libraries that call out to the actual internet.
       
 (DIR) Post #AdPZqrnyxDfrZKK6eu by agateau@mastodon.xyz
       2024-01-01T19:24:12Z
       
       0 likes, 0 repeats
       
       @maco Ah, I actually meant functional, not integration tests.But I think it depends on the type of software, if you have to mock a lot of components to test your code I can see how writing functional or integration tests up front is not practical.
       
 (DIR) Post #AdPacV5ohXYr1mNXw8 by maco@wandering.shop
       2024-01-01T19:32:32Z
       
       0 likes, 0 repeats
       
       @agateau I feel like Advent of Code is the only time I can actually write tests first (and actually it does make Advent of Code so much easier when I have doc tests for each function) because there’s an API call to some server somewhere in anything I do for work.