ContributionsMost RecentMost LikesSolutionsRe: Cucumber v7 formatter crash 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 Re: Setting timeout does not work with cucumber-js v7 As of Cucumber v7 you can not place the setDefaultTimeout inside a hook or step. The first suggestion was to put it in the file where you also create a custom world object. This did not work for me, and I can imagine that not everyone creates custom world object. After some tries I found out that setDefaultTimeout works when you define the setDefaultTimeout in one of the step files as global function. 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 Setting timeout does not work with cucumber-js v7 Hi I'm busy migrating our tests from v6 to v7. We set the timeout using the setDefaultTimeout function. With v6 everything is working fine. With v7 it seems that setDefaultTimeout is not working, I only get the timeouts to work in step methods when I add { timeout: 60000}. Any ideas what can be different between v6 and v7? Regards Marco Re: Step level screenshot in cucumber Hi Just stumbled on this thread. I had the same problem See code below. When I use the Then function without settting a timeout, the test stops with a message that timeout of 5000ms has been reached. If I add the timeout {timeout: 60000} then it works. Looks like adding the screenshots with world.attach takes too long (taking the screenshot is instantly)?? I'm using Cucumber v7.0.0 ''' Then('patient info shows patient name {string}', async function (this: CustomWorld, name: string😞 Promise<void> { const actualPatientName = await getPatientName(); expect(actualPatientName).to.be.equal(name); await ActualResultWithScreenshot(`Patient info shows patient name "${actualPatientName}"`, this); }); ''' ''' export async function ActualResultWithScreenshot( message: string | null | undefined, world: CustomWorld 😞 Promise<void> { if (message) { ActualResult(message, world); } const screenshot = await world.cath.page?.screenshot(); // Take screenshot from playwright page if (screenshot) { world.attach(screenshot, 'image/png'); } } '''