by csb6 · 6y ago · 0 comments
I do not understand this. Has the author used diff or stdin/stdout redirection? Testing CLI is trivial in comparison to testing a GUI or another kind of interface; it is all text and so can easily be compared against a correct result. CLIs are not meant for every task, but one of their core advantages is ease of automation and testing.
CLI parsing (mapping to real calls) may have bugs. How do you test this?
Both options suggested eliminate this possibility completely.
> one of their core advantages is ease of automation and testing.
Any example when suggested options are any worse in this sense?
If it is that simple, you can just devote this to package like typer. That's what I point to - don't write it.
I see people somehow read GUI along the lines, while I never even considered that as an option. Added a note and please read completely before commenting
Imagine you write ASR system (from CLI input to output - week(s) of training, requires several servers). Mind telling me more about using diff/stdin/stdout in this case?
Well, forget ASR, take any ML system.