zlacker

[return to "GitHub Copilot available for JetBrains and Neovim"]
1. Spinna+ad[view] [source] 2021-10-27 18:42:37
>>orph+(OP)
How well can copilot write unit tests? This seems like an area where it could be really useful and actually improve software development practices.
◧◩
2. kqr+Cd[view] [source] 2021-10-27 18:44:34
>>Spinna+ad
If you're looking for test case generation there are already mature tools for that. I doubt anything generic could improve on those.
◧◩◪
3. ericle+lf[view] [source] 2021-10-27 18:52:17
>>kqr+Cd
any suggestions for said tools?
◧◩◪◨
4. svieir+Ej[view] [source] 2021-10-27 19:13:29
>>ericle+lf
QuickcCheck-type tools (generators for tests that know about the edge cases of a domain - e. g. for the domain of numbers considering things like 0, the infinities, various almost-and-just-over powers of two, NaN and mantissas for floats, etc.):

* QuickCheck: https://hackage.haskell.org/package/QuickCheck

* Hypothesis: https://hypothesis.readthedocs.io/en/latest/

* JUnit QuickCheck: https://github.com/pholser/junit-quickcheck

Fuzz testing tools (tools which mutate the inputs to a program in order to find interesting / failing states in that program). Generally paired with code coverage:

* American Fuzzy Lop (AFL): https://github.com/google/AFL

* JQF: https://github.com/rohanpadhye/JQF

Mutation / Fault based test tools (review your existing unit coverage and try to introduce changes to your _production_ code that none of your tests catch)

* PITest: https://pitest.org/

[go to top]