Forum Discussion

mortelee's avatar
mortelee
Occasional Contributor
4 years ago

Cucumber v7 formatter crash

Hi all

 

I'm migrating from cucumber v6 to v7.

I run my test using following command: 

cucumber-js features/ -p ui --require steps/ --format @cucumber/pretty-formatter
 

Whenever I run my test I always get (also without pretty format I get the same error):

 

TypeError: formatter.finished is not a function
at bluebird_1.default.each (D:\git\ISCVmain\apps\cath\automation\node_modules\@cucumber\cucumber\lib\cli\index.js:101:33)
at tryCatcher (D:\git\ISCVmain\apps\cath\automation\node_modules\bluebird\js\release\util.js:16:23)
at Object.gotValue (D:\git\ISCVmain\apps\cath\automation\node_modules\bluebird\js\release\reduce.js:166:18)
at Object.gotAccum (D:\git\ISCVmain\apps\cath\automation\node_modules\bluebird\js\release\reduce.js:155:25)
at Object.tryCatcher (D:\git\ISCVmain\apps\cath\automation\node_modules\bluebird\js\release\util.js:16:23)
at Promise._settlePromiseFromHandler (D:\git\ISCVmain\apps\cath\automation\node_modules\bluebird\js\release\promise.js:547:31)
at Promise._settlePromise (D:\git\ISCVmain\apps\cath\automation\node_modules\bluebird\js\release\promise.js:604:18)
at Promise._settlePromise0 (D:\git\ISCVmain\apps\cath\automation\node_modules\bluebird\js\release\promise.js:649:10)
at Promise._settlePromises (D:\git\ISCVmain\apps\cath\automation\node_modules\bluebird\js\release\promise.js:729:18)
at _drainQueueStep (D:\git\ISCVmain\apps\cath\automation\node_modules\bluebird\js\release\async.js:93:12)
at _drainQueue (D:\git\ISCVmain\apps\cath\automation\node_modules\bluebird\js\release\async.js:86:9)
at Async._drainQueues (D:\git\ISCVmain\apps\cath\automation\node_modules\bluebird\js\release\async.js:102:5)
at Immediate.Async.drainQueues (D:\git\ISCVmain\apps\cath\automation\node_modules\bluebird\js\release\async.js:15:14)
at runCallback (timers.js:705:18)
at tryOnImmediate (timers.js:676:5)
at processImmediate (timers.js:658:5)

 

Anyone any idea what is happening?

 

Regards Marco

  • What is specified in the `ui` profile?

    Could you try without it?

     

    Could you execute `cucumber-js --version` just before to make sure of the version currently in use?

     

    Do you have the error message only when specifying pretty-formatter, or even without any specified formatter?

    • mortelee's avatar
      mortelee
      Occasional Contributor

      Hi
      This was specified in my profile

       

      const defaultConfiguration = [
        '--tags "not @ignore"',
        ' -f json:' + reportCapturePath + '/cucumber_report.json',
        ' -f ../node_modules/cucumber-pretty',
        ' -f ../node_modules/cucumber-junit-formatter:' + reportCapturePath + '/cucumber_report.xml'
      ];
      const ui = [
        '--tags @ui',
        ...defaultConfiguration
      ].join(' ');
       
      I was completely forgotten that also formatters were defined in the profile.
      I removed the obsolete cucumber-pretty formatter -> still failing
      I removed the junit formatter -> now it works - have to see what we are going to do with this
       
      Thanks for the inside
       
      Regards Marco