Testing CLI Applications
Testing is an important phase of any software development project. The purpose of testing is to ensure that the application we put into the hands of our users behaves as expected and doesn’t cause any harm to users (by leaking their personal information or by allowing malicious actors to take advantage of a security issue to harm users).
In this chapter, we will discuss why testing is so important and explore different testing techniques and tools that will help us achieve this goal. More specifically, we will discuss the following:
- Why testing is important
- Different types of tests
- What to test, how to do it, and when to run these tests
- How to mock external dependencies when writing unit tests