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
Describe the bug
Try to attach the json log in the step definition and it is not attaching in the multiple-cucumber-html-reporter. But it is working fine in the normal cucumber report
/Users/test/Documents/Workspace/miscellaneous/PurpleRouter/node_modules/multiple-cucumber-html-reporter/lib/generate-report.js:406
scenario.steps.forEach((step) => {
^
SyntaxError: Unexpected token i in JSON at position 0
at JSON.parse ()
at /Users/test/Documents/Workspace/miscellaneous/PurpleRouter/node_modules/multiple-cucumber-html-reporter/lib/generate-report.js:425:24
at Array.forEach ()
at /Users/test/Documents/Workspace/miscellaneous/PurpleRouter/node_modules/multiple-cucumber-html-reporter/lib/generate-report.js:409:25
at Array.forEach ()
at _parseSteps (/Users/test/Documents/Workspace/miscellaneous/PurpleRouter/node_modules/multiple-cucumber-html-reporter/lib/generate-report.js:406:20)
at /Users/test/Documents/Workspace/miscellaneous/PurpleRouter/node_modules/multiple-cucumber-html-reporter/lib/generate-report.js:328:18
at Array.forEach ()
at _parseScenarios (/Users/test/Documents/Workspace/miscellaneous/PurpleRouter/node_modules/multiple-cucumber-html-reporter/lib/generate-report.js:318:22)
at /Users/test/Documents/Workspace/miscellaneous/PurpleRouter/node_modules/multiple-cucumber-html-reporter/lib/generate-report.js:226:17
But i could see json response in the normal cucumber report
To Reproduce
Steps to reproduce the behavior:
Try to attach any of json response in the cucmeber step definion
2. Run the following command to generate report and observe
npx ts-node src/helper/report/cucumberReport.ts
3. observe the error
[Include code or an example repository that can easily be set up]
Expected behavior
It should not throw error and able to generate reprot
Log
If applicable, add logs to help explain your problem. If you don't have logs, enable 'debug:true' in the config and paste the log here.
Please use proper markdown to style it
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
Environment (please complete the following information):
Config of multiple-cucumber-html-reporter
An example of how you configured the reporter in your config
import report = require('multiple-cucumber-html-reporter')
report.generate({
jsonDir: 'reports/cucumberReport',
reportName: 'Portal Report',
reportPath: './reports/cucumberReport',
metadata: {
browser: {
name: '',
version: '',
},
device: 'Local test machine',
platform: {
name: '',
version: '',
},
},
customData: {
title: 'Run info',
data: [
{ label: 'Project', value: 'Test' },
{ label: 'Application', value: 'Portal' },
],
},
})
Describe the bug
Try to attach the json log in the step definition and it is not attaching in the multiple-cucumber-html-reporter. But it is working fine in the normal cucumber report
/Users/test/Documents/Workspace/miscellaneous/PurpleRouter/node_modules/multiple-cucumber-html-reporter/lib/generate-report.js:406
scenario.steps.forEach((step) => {
^
SyntaxError: Unexpected token i in JSON at position 0
at JSON.parse ()
at /Users/test/Documents/Workspace/miscellaneous/PurpleRouter/node_modules/multiple-cucumber-html-reporter/lib/generate-report.js:425:24
at Array.forEach ()
at /Users/test/Documents/Workspace/miscellaneous/PurpleRouter/node_modules/multiple-cucumber-html-reporter/lib/generate-report.js:409:25
at Array.forEach ()
at _parseSteps (/Users/test/Documents/Workspace/miscellaneous/PurpleRouter/node_modules/multiple-cucumber-html-reporter/lib/generate-report.js:406:20)
at /Users/test/Documents/Workspace/miscellaneous/PurpleRouter/node_modules/multiple-cucumber-html-reporter/lib/generate-report.js:328:18
at Array.forEach ()
at _parseScenarios (/Users/test/Documents/Workspace/miscellaneous/PurpleRouter/node_modules/multiple-cucumber-html-reporter/lib/generate-report.js:318:22)
at /Users/test/Documents/Workspace/miscellaneous/PurpleRouter/node_modules/multiple-cucumber-html-reporter/lib/generate-report.js:226:17
But i could see json response in the normal cucumber report
To Reproduce
Steps to reproduce the behavior:
npx ts-node src/helper/report/cucumberReport.ts
3. observe the error
[Include code or an example repository that can easily be set up]
Expected behavior
It should not throw error and able to generate reprot
Log
If applicable, add logs to help explain your problem. If you don't have logs, enable 'debug:true' in the config and paste the log here.
Please use proper markdown to style it
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: