prashant-ramcharan / courgette-jvm

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

Report not generated due to com.google.gson.stream.MalformedJsonException #422

Open divanov-ki opened 11 hours ago

divanov-ki commented 11 hours ago

@prashant-ramcharan I bumped courgette-jvm from 6.13.0 to 6.17.0 (and subsequently to 6.18.0 to see if behaviour is different) and the reporting broke with the following exception thrown:

Screenshot 2024-11-19 at 13 59 49

For context our test run includes 300+ scenarios executed, so quite a bit of test related metadata generated to support the report generation at the end of execution. Could this be related to the bugfix you added in 6.17.0 to resolve the creation of parent directories for reporting issue?

divanov-ki commented 11 hours ago

Worth noting that more conservative runs with less scenarios executed generate the report just fine

divanov-ki commented 9 hours ago

I realise this issue is actually a duplicate of https://github.com/prashant-ramcharan/courgette-jvm/issues/410. You can treat it as a confirmation that it's still an issue for extended test runs

prashant-ramcharan commented 6 hours ago

Hi, I'm not sure if it's related to https://github.com/prashant-ramcharan/courgette-jvm/issues/410 as in this case the report generation was attempted whereas in issue 410 the report generation failed completely, likely related to JVM out of memory.

The issue here seems to be the parsing of the json file.

You should see a courgette-report-processing-errors.txt if the are any processing errors.

  1. Do you have com.google.gson dependency defined in your build.gradle or pom file? If so, what version are you using?
  2. Could you share the json report for me to debug? This file will be in the report directory you defined in your Courgette runner (reportTargetDir)
  3. Can you consistently reproducible this?
  4. Is it the exact same error every time?
  5. Do you have the json plugin in your runner (i.e. Courgette runner -> cucumberOptions -> plugin -> json:some-path) enabled? Have you tried disabling to test?