(I'm assuming there is a good reason not to use the junit runner & that you're calling cucumber.api.cli.Main
, if either assumption is false pls clarify the question)
The simplest/most expedient solution, given that cucumber.api.cli.Main
is approx 4 lines of code, is to write your own main method that is a clone of the cucumber one without the System.exit
call.
Separately you could raise the issue on their github site and/or send them a pull request with the required tweak to their Main
class (e.g. don't do the system.exit if some system property has been set).