question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Wanted to have the json logs without json-formatter.exe so that cucumber report can be generated

See original GitHub issue

Current behavior

Unable to get the logs without using json-formatter.exe

Desired behavior

I wanted to get the logs in JSON file of my last test run so that I can generate a cucumber report running on the agent through the CI pipeline. I can not check in json-formatter.exe so wanted eliminate the json-formatter.exe file usage.

Test code to reproduce

Versions

  • Cypress version: 10.3.0
  • Preprocessor version: 11.5.1
  • Node version: 14.18.1

Checklist

  • I’ve read the FAQ.
  • I’ve read Instructions for logging issues.
  • I’m not using cypress-cucumber-preprocessor@4.3.1 (package name has changed and it is no longer the most recent version, see #689).

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
sagar-maheshwaricommented, Oct 3, 2022

I’ve been using https://github.com/Vitalizzzer/cucumber-json-report-formatter

It consumes the messages file and generates the JSON without the need for a formatter. However, they have an open issue where the step duration shows incorrectly, however, if it doesn’t bother you, you can try this out.

1reaction
sagar-maheshwaricommented, Oct 7, 2022

You can run the js file using node after your test execution is finished, but the easiest way is to amend the configuration in .cypress-cucumber-preprocessorrc.json or package.json as below: image

I tried this but it is expecting to run cucumber-json-formatter and looking for that exe in the after:run tag event image

Do you have a after:run event in your config? If yes, you’d need to amend it. example here: https://github.com/badeball/cypress-cucumber-preprocessor/issues/805#issuecomment-1218399297

Read more comments on GitHub >

github_iconTop Results From Across the Web

cypress-cucumber-preprocessor - not logging to messages.json
Yes, I'm using a Windows machine and have the right cucumber-json-formatter.exe. By windows PATH, I believe you're referring to the project ...
Read more >
Cannot read property 'JsonFormatter' of undefined · Issue #854
js file, in order to have cucumber-html-reporter working back again. My hooks.js explicitly creates a json file with the execution report, that ...
Read more >
How to Generate Cucumber Reports in Framework - Tools QA
Steps to generate Junit XML Report in Cucumber. JSON ... As we know that Cucumber is a BDD framework, it does not have...
Read more >
Automated HTML Reports with Cypress 10+ & Cucumber? Repo
Automated HTML Reports with Cypress 10+ & Cucumber ? Repo: https://github.com/JoanEsquivel/cypress- cucumber -boilerplate#cypress #testing ...
Read more >
Windows Analysis Report cucumber-json-formatter
Therefore the report might not work properly. ... Source: C:\Users\user\Desktop\cucumber-json-formatter.exe ... Make, xrefs: 0041D2AC.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found