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)

Collapse
 
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 github.com/git/git/blob/master/Doc... (line 542).

Collapse
 
dbwest profile image
David West