DEV Community

Adam Crockett
Adam Crockett

Posted on


Automated testing a cli

I have heard of acceptance tests for websites but can I / should I go beyond unit tests? Have you ever done anything like this I'd love to know your thoughts.

Top comments (2)

aroman012 profile image
Alejandro Roman • Edited

I think almost all non-trivial production-ready apps should have automated testing of some kind, and that includes CLI apps. Altough not as heard of as in web development, CLI apps can also be tested. One example is the Git project, which won't accept new contributions if the developer doesn't implement unit tests for that new feature/fix.

You can find more info about the Git project testing approach at (line 542).

dbwest profile image
David West