3 ms·
When setting up unit tests traditionally took more time and LOC than the logic itself, LLMs are particularly useful. 1. Paste in my actual code. 2. Prompt: Wr
by alienchow 2y ago
When setting up unit tests traditionally took more time and LOC than the logic itself, LLMs are particularly useful.
1. Paste in my actual code.
2. Prompt: Write unit tests, test tables. Include scenarios: A, B, C, D, E. Include all other scenarios I left out, isolate suggestions for review.
I used to spend the majority of the coding time writing unit tests and mocking test data, now it's more like 10%.
- arkh 2y ago> Paste in my actual code. > Prompt: Write unit tests TDD in shambles. What you'd like is: > Give your specs to some AI > Get a test suite generated with all edge cases accounted for > Code
- alienchow 2y agoMatter of preference. I've found TDD to be inflexible for my working style. But your suggestion would indeed work for a staunch TDD practitioner.