You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I use JSON format to generate results, I encounter the following error.
error logs:
/app/node_modules/@cucumber/cucumber/src/formatter/json_formatter.ts:185
this.log(JSON.stringify(features, null, 2))
^
RangeError: Invalid string length
at JSON.stringify ()
at JsonFormatter.onTestRunFinished (/app/node_modules/@cucumber/cucumber/src/formatter/json_formatter.ts:185:19)
at EventEmitter. (/app/node_modules/@cucumber/cucumber/src/formatter/json_formatter.ts:92:14)
at EventEmitter.emit (node:events:532:35)
at EventEmitter.emit (node:domain:488:12)
at Coordinator.onWorkerProcessClose (/app/node_modules/@cucumber/cucumber/src/runtime/parallel/coordinator.ts:185:29)
at ChildProcess. (/app/node_modules/@cucumber/cucumber/src/runtime/parallel/coordinator.ts:146:12)
at ChildProcess.emit (node:events:520:28)
at ChildProcess.emit (node:domain:488:12)
at maybeClose (node:internal/child_process:1105:16)
✅ What did you expect to see?
Expected to see a JSON report without any formatting issues
📦 Which tool/library version are you using?
node version 18.17.0 or latest
cucumber ts 10.6.0
🔬 How could we reproduce it?
Steps to Reproduce:
In the runner file, use JSON format and add the JSON path to generate the reports.
Include additional screenshots in the test scripts to increase the report size to over 500MB, then observe the json formatter issue after the test is completed.
The JSON formatter you are using is not able to write streaming data. So total size of the report will always be limited.
We do have a message formatter that does stream the data and writes .ndjson files. Size limitations should be less of a factor here. See https://github.com/cucumber/messages for the format.
Though there are not many tools that can consume this format it yet and we are still migrating our internal tools. This is a slow process and will take time. Currently a few of our internal tools do support it:
Though worth noting that the html-formatter does not externalize files. So size issues will come back when viewing the report (cucumber/html-formatter#281).
As Cucumber is an Opensource project I reckon your options are:
Reduce the size of your reports.
Requests that your reporting tools support the message format.
Provide a pull request with that support to your favorite reporting tool.
@davidjgoss is anything people could do to help out with externalizing files in the html formatter?
👓 What did you see?
When I use JSON format to generate results, I encounter the following error.
error logs:
/app/node_modules/@cucumber/cucumber/src/formatter/json_formatter.ts:185
this.log(JSON.stringify(features, null, 2))
^
RangeError: Invalid string length
at JSON.stringify ()
at JsonFormatter.onTestRunFinished (/app/node_modules/@cucumber/cucumber/src/formatter/json_formatter.ts:185:19)
at EventEmitter. (/app/node_modules/@cucumber/cucumber/src/formatter/json_formatter.ts:92:14)
at EventEmitter.emit (node:events:532:35)
at EventEmitter.emit (node:domain:488:12)
at Coordinator.onWorkerProcessClose (/app/node_modules/@cucumber/cucumber/src/runtime/parallel/coordinator.ts:185:29)
at ChildProcess. (/app/node_modules/@cucumber/cucumber/src/runtime/parallel/coordinator.ts:146:12)
at ChildProcess.emit (node:events:520:28)
at ChildProcess.emit (node:domain:488:12)
at maybeClose (node:internal/child_process:1105:16)
✅ What did you expect to see?
Expected to see a JSON report without any formatting issues
📦 Which tool/library version are you using?
node version 18.17.0 or latest
cucumber ts 10.6.0
🔬 How could we reproduce it?
Steps to Reproduce:
📚 Any additional context?
No response
The text was updated successfully, but these errors were encountered: