4 ms·
It ensures separation of concerns is at least minimally applied in order to support two separate presentation layers (GUI & CLI). CLIs are also much more testab
by stult 5y ago
It ensures separation of concerns is at least minimally applied in order to support two separate presentation layers (GUI & CLI). CLIs are also much more testable in general, so usually it’s easier to write e2e tests if a CLI is present. It might not cover 100% of the code because it doesn’t test the GUI, but does often get you something substantial like 90% of the way there.
- bopbeepboop 5y agoIt depends on the application, but CLIs can make testing GUIs easier in two ways: - you can test the rendering layer in isolation by using the GUI to display two pieces of information manipulated by the CLI and comparing the renders, eg blank screen -> add some object. - you can comparison test the GUI, eg pressing button X produces the same result as CLI option Y. Properly testing a GUI requires having an internal CLI, in places I’ve worked — eg, app companies.