Closed rselias closed 6 years ago
Hi @rselias, this is a known issue with Gradle and Windows OS and it is indeed related to System.exit()
This Gradle exception will not cause Courgette to fail and will not mark the build as a failure unless there was an actual test failure.
This Gradle exception will simply be written to the console and will not have any impact on the overall build result - whether running locally or in a CI tool.
Because the Junit run notifier is not updated, Courgette has to use System.exit() to set the build result.
But as previously mentioned, the thrown Gradle exception will not influence the Courgette build result.
Although this is a limitation on Gradle and Windows OS, it will not affect the way Courgette-JVM runs or reports.
I will however add this as a note in the known issues section of the README.
Will add a workaround to this message even though it's an issue with Windows and Gradle and not Courgette directly.
The Gradle MessageIOException will no longer appear at the end of the test run.
This is now released in version 2.4.2
Because Maven Surefire isn't compatible with libraries that call
System.exit()
, I'm switching my project from Maven to Gradle, but I'm still having difficulty running Courgette. I can run Cucumber runners normally with Gradle, so it isn't the Gradle installation. To make sure it wasn't an issue with my project, I cloned your example project. If I go into that directory and rungradle runScenariosUsingJUnit
, the test runs and at the end throws the following exception.The build also fails after the exception, and seems to be indicating it's due to Courgette's use of
System.exit(1)
when not every scenario passes. If I remove the example scenario that is meant to fail, the exception is still thrown but the build does not fail.I am running Gradle 4.8.1 on Windows 8.1