ctest
is a simple tool aimed to automate testing of CLI applications.
Although it is a generic tool, it has be developed initially to test the koobind
kubectl extension.
You will find the corresponding test suite at this location.
This will provide you with a complete sample, in order to use it for others use cases.