In Code Complete page 25, it's said that it's a good idea to be able to easily replace the regular user interface classes by a command line one.

Knowing its advantages for testing, what about the problems it may bring?

Will this extra work really pay off for web and mobile projects? What about small and medium projects; do the same rules apply? 
What if it makes your design more complex?

Completely aside from testing, the obvious advantage to this approach is that it will make your project automatable and scriptable.  If I'm able to send command-line commands to a program, I can write up a script to perform complicated tasks much more easily (and more reliably!) than I could create a macro to automate the same thing on a GUI.

Whether or not that's actually worth doing, of course, depends entirely on whether or not you have a lot of users who would want to automate your program.
