It depends on the criticality of your command line tools. One interessting approach is the one by the SpringBoot guys. They run commands in a Docker container and collect stdout to check the behaviour of their System V start script.

=> https://github.com/spring-projects/spring-boot/blob/9d0780c625036ff9cc60ec88c4e4dfabf5a889bc/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/test/java/org/springframework/boot/loader/tools/DefaultLaunchScriptTests.java

Oliver

Am 20.08.18 um 15:59 schrieb Mark H. Wood:
When writing integration tests for command-line tools, is there any
support in Failsafe, jUnit, or elsewhere to fork a process and manage
its standard IO streams?

Or am I over-designing?  Would one typically write such an integration
test rather like a unit test, bypassing the command analyzer and just
calling the appropriate method on an instance created by the test
suite?  Without stubbing or mocking the underlying code, of course,
since it's an integration test.

Is there a better place to ask?


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to