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

Replacement of cucumber-json-formatter? Because of the warning that it is a virus/malware #708

Closed
OSnuszka opened this issue May 9, 2022 · 3 comments

Comments

@OSnuszka
Copy link

OSnuszka commented May 9, 2022

Current behavior

It tries to generate a json file - it needs cucumber-json-formatter to generate it correctly. Unfortunately when I try to download this exe file I get information that it is a type Trojan virus.

image
image

Without this file I get the following error:

image

I reported the problem on the cucumber-json-fromatter github and got the following response:
cucumber/common#1974

Desired behavior

Is it possible to use a tool other than? cucumber-json-formatter

Maybe the response from the link on GitHub suggests something:
image

@OSnuszka OSnuszka closed this as completed May 9, 2022
@OSnuszka OSnuszka reopened this May 9, 2022
@badeball
Copy link
Owner

badeball commented May 9, 2022

Is it possible to use a tool other than? cucumber-json-formatter

No, there are no other tools. That your antivirus is giving you a false positive is unfortunate, but not really my problem.

Maybe the response from the link on GitHub suggests something:

I've asked for a clarification in cucumber/common#1916 (comment).

@badeball badeball closed this as completed May 9, 2022
@adamzoltan873
Copy link

adamzoltan873 commented May 31, 2022

Hello @OSnuszka,

In plugins/index.js if you call the preprocessor with:
await cypressCucumberPreprocessor.addCucumberPreprocessorPlugin(on, config, {omitAfterRunHandler: true});

and your cypress-cucumber-preprocessor config has something like this

{
...
messages: {
    enabled: true,
    output: `cucumber-messages.ndjson`
  }
...
}

then you can catch up your ndjson with a gulp task like this

gulp.task('cucumber-json', (cb) => {
  exec('npx ndjson-to-json [path-to-ndjson]/cucumber-messages.ndjson -o [path-to-cucumberjson]/cucumber.json', (err, stdout, stderr) => {
    console.log(stdout);
    console.log(stderr);
    cb(err);
  })
})

You obviously need to install ndjson-to-json npm package too.

@xyngfei
Copy link

xyngfei commented Jun 2, 2022

I think should be a similar issue.

I am trying to enable the JSON reporting, encounter this issue,

Package.json
"cypress": "^9.7.0",
"@badeball/cypress-cucumber-preprocessor": "^10.0.2",

"cypress-cucumber-preprocessor": { "json": { "enabled": true}}

image

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

4 participants