hdorgeval/testcafe-reporter-cucumber-json

report.json doesn't show failed tests when running '.testcafe' test files, but looks good for '.js' test files

ravinder455 opened this issue · 8 comments

When running tests for .testcafe files, report.json file has elements only for passed tests (missing for failed tests). However runInfo shows testscount and passed with correct numbers. Also console log (spec output) has all running tests info (passed & failed).

Missing elements for failed tests are resulting in incorrect HTMl report (always 100% passed).

I didn't see this issue when running same tests through .js files (converted .testcafe files to .js using testcafe studio)

Versions

  • testcafe-reporter-cucumber-json: "^2.0.0"

  • testcafe: "^1.3.3"

  • multiple-cucumber-html-reporter: "^1.10.2"

  • Browser : Chrome , Chromium Headless

  • OS: Mac, Linux

** Testcafe configuration **
{ "browsers": "chrome", "reporter": [ "spec", { "name": "cucumber-json", "output": "reports/report.json" } ], "skipUncaughtErrors":true, "src": ["./tests/*.testcafe"] }

  • A generated testcafe-reporter-cucumber-json.json file (no changes in noisy tags)

Hi @ravinder455 , thank you for your feedback, it would be great if you could share a repo that shows this problem.

@hdorgeval , Thank you so much for responding on my request.

Here is the repo - https://github.com/ravinder455/testcafe_html_issue.git.

While creating the repo, I have noticed 2 different behaviors of the issue. ReadMe page has all details of the problem and repo.

Hi @ravinder455 , thank you very much for the time you have spent to create this repo 👍 . Give me some time to check what is going on.

Hi @ravinder455 , v3.0.0 has been published to npm and should resolve your issue. Could you give it a try and provide any feedback?

Issue is resolved. You are awesome.
Thanks a lot, @hdorgeval

@hdorgeval,

We are getting this console error for all failed tests. Is there a way we can silence these error logs ?

testcafe-reporter-cucumber-json: please provide the following log to github.com/hdorgeval/testcafe-reporter-cucumber-json :
testcafe-reporter-cucumber-json : { err:
   TestRunErrorFormattableAdapter {
     TEMPLATES:
      { E9: [Function: E9],
        E10: [Function: E10],
        E11: [Function: E11],
        E12: [Function: E12],
        E54: [Function: E54],
        E1: [Function: E1],
        E2: [Function: E2],
        E45: [Function: E45],
        E46: [Function: E46],
        E47: [Function: E47],
        E48: [Function: E48],```

Hi @ravinder455 , thank you for your feedback. I will fix it asap.

Hi @ravinder455, your last feedback should be solved by v3.0.1 available on npm.

Those warning messages should not be emitted any more in the log.