prashant-ramcharan / courgette-jvm

Multiprocess | Parallel Cucumber-JVM | Parallelize your Java Cucumber tests on a feature level or on a scenario level.
MIT License
130 stars 38 forks source link

When the thread count is provided as 1 to run the cucumber tests sequentially, Corrupted STDOUT by directly writing to native stream in forked JVM 1 is displayed #328

Closed MadhuQAAutomation closed 2 years ago

MadhuQAAutomation commented 2 years ago

@prashant-ramcharan - As suggested before, I tried to provide the thread count as 1 in the cucumber Runner class and executed my test in Maven. While running the tests through command line with mvn verify command, test is executed and passed, however the logs and other statements are not printed in the command window and a warning message is displayed as : [WARNING] Corrupted STDOUT by directly writing to native stream in forked JVM 1. See FAQ web page and the dump file C:*****\target\surefire-reports\2022-04-06T14-51-22_681-jvmRun1.dumpstream target\surefire-reports image Content of the dump file :** image

I tried with the below combinations to see if there is any issue with these dependencies.

Combinations :

Maven Version : Maven 3.8.4 JAVA Version : 8, Junit : 4.12, 4.13, 5.8.2, Surefire : 3.0.0-M3,3.0.0-M5, 2.22.2, 3.0.0-M6(latest release) JAVA Version : 11, Junit : 4.12, 4.13, Surefire : 3.0.0-M3,3.0.0-M5, 2.22.2, 3.0.0-M6(latest release)

However when I created a normal Test Runner file (not Courgette), and ran the test, it got executed. image

Note : This is happening only for Maven. I tried in gradle and there is no such issue observed. I was able to run the feature files sequentially by providing the thread =1 in the test runner file.

prashant-ramcharan commented 2 years ago

Hi @MadhuQAAutomation

If you run your maven command with -X you should see the output etc..

mvn verify -X

With regards to the warning message.. this is from the surefire plugin and should not affect the Courgette run.

MadhuQAAutomation commented 2 years ago

But when i see the below JIRA, it has been fixed in Surefire 2.22.2 and 3.0.0-M3 https://issues.apache.org/jira/browse/SUREFIRE-1614

prashant-ramcharan commented 2 years ago

As this error is coming from the surefire plugin, please raise a separate issue in that project if required.

This error should would not effect the way Courgette runs the tests.