Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTML reports not created #423

Open
MadhuQAAutomation opened this issue Dec 23, 2024 · 8 comments
Open

HTML reports not created #423

MadhuQAAutomation opened this issue Dec 23, 2024 · 8 comments

Comments

@MadhuQAAutomation
Copy link

Hi @prashant-ramcharan - Today I upgraded to courgette 6.18.0 from 6.13.0. When I ran my test suite which contains ~ 300+ feature files. I got the below error in the console:

[ERROR] Tests run: 331, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1825 s <<< FAILURE! -- in runners.RunCucumberIT [ERROR] runners.RunCucumberIT -- Time elapsed: 1825 s <<< ERROR! com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Unterminated string at line 1 column 3727266 path $[320].elements[1].steps[6].match. See https://github.com/google/gson/blob/main/Troubleshooting.md#malformed-json at com.google.gson.internal.Streams.parse(Streams.java:58) at com.google.gson.JsonParser.parseReader(JsonParser.java:146) at com.google.gson.JsonParser.parseReader(JsonParser.java:110) at com.google.gson.JsonParser.parse(JsonParser.java:171) at courgette.runtime.report.JsonReportParser.parseJsonReport(JsonReportParser.java:107) at courgette.runtime.report.JsonReportParser.createFeatures(JsonReportParser.java:69) at courgette.runtime.report.JsonReportParser.createFeatures(JsonReportParser.java:60) at courgette.runtime.CourgetteRunner.createCucumberReport(CourgetteRunner.java:127) at courgette.api.junit.Courgette.run(Courgette.java:60) Caused by: com.google.gson.stream.MalformedJsonException: Unterminated string at line 1 column 3727266 path $[320].elements[1].steps[6].match. See https://github.com/google/gson/blob/main/Troubleshooting.md#malformed-json at com.google.gson.stream.JsonReader.syntaxError(JsonReader.java:1754) at com.google.gson.stream.JsonReader.nextQuotedValue(JsonReader.java:1120) at com.google.gson.stream.JsonReader.nextName(JsonReader.java:881) at com.google.gson.internal.bind.TypeAdapters$28.read(TypeAdapters.java:879) at com.google.gson.internal.bind.TypeAdapters$28.read(TypeAdapters.java:820) at com.google.gson.internal.Streams.parse(Streams.java:46) ... 8 more

Test Runner:

image

generateCourgetteRunLog is set to true. But in the target folder, I don't see any courgette folder that got created and no log file as well.

image

Till last week, I was using courgette version 6.13.0 and it was running fine without any issue.

Java version : Java 21
OS : Mac Sequoia
Courgette version : 6.18.0
cucumber version: 7.20.1

@prashant-ramcharan
Copy link
Owner

Hi, does this happen on every run or is it intermittent?

Could it be related this issue?

#422 (comment)

@MadhuQAAutomation
Copy link
Author

Hi - This is occurring on every run. I tried for 5 times and all those 5 runs, I saw the same behavior. Becuase of this, I reverted back to 6.13.0.

@MadhuQAAutomation
Copy link
Author

Hi @prashant-ramcharan - As mentioned in #422, in my test suite also, few of the feature file names were having spaces. After fixing those feature files by replacing the spaces with "_", I didn't got the errors as before and the HTML report also created successfully.

@prashant-ramcharan
Copy link
Owner

prashant-ramcharan commented Dec 24, 2024

Thanks for confirming.

What was your feature file name before removing the spaces?

@MadhuQAAutomation
Copy link
Author

MadhuQAAutomation commented Jan 2, 2025 via email

@MadhuQAAutomation
Copy link
Author

Thanks for confirming.

What was your feature file name before removing the spaces?

Eg: TC01_Verify_email id is_valid_and check for error_message

@prashant-ramcharan
Copy link
Owner

I will provide a fix for this. Thanks!

@prashant-ramcharan
Copy link
Owner

This is now fixed in Courgette version 6.18.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants