I am working on a complex multi-module maven project. One of the modules is an executable jar that implements a command line application. I need to integrate testing this application. I need to run it several times, with several different commands, and check the exit status and stdout / err. However, I cannot find a plugin for maven that claims to support this, and also cannot track the JUnit library, which supports command line application testing.
Before you say, βDon't test the main method - do bla instead,β in which case I really want to test the main method, not some helper functions. The thing is to launch the application as a user in his own virtual machine and in the environment, and also check that he behaves himself - the correct definition of command line parameters, exit from the recording state and hot loading of the correct classes from the right bank plug-in .
source
share