I'm facing the same problem here, what can I do to run the tests using the command that you added here?
npm test --TAGS="@smoke" || true
So far this is my config.
cucumber.js
module.exports = {
timeout: 30000,
use: {
actionTimeout: 30000,
navigationTimeout: 120000
},
default: {
// tags: process.env.TAGS || process.env.npm_config_tags || '',
paths: ['src/test/features/'],
require: ['src/test/steps/*.js', 'src/hooks/hooks.js'],
format: [
'progress-bar',
'html:test-results/cucumber-report.html',
'json:test-results/cucumber-report.json',
'rerun:@rerun.txt'
],
formatOptions: { snippetInterface: 'async-await' },
publishQuiet: true,
dryRun: false,
parallel: 1
},
rerun: {
require: ['src/test/steps/*.js', 'src/hooks/hooks.js'],
format: [
'progress-bar',
'html:test-results/cucumber-report-rerun.html',
'json:test-results/cucumber-report-rerun.json',
'rerun:@rerun.txt'
],
formatOptions: { snippetInterface: 'async-await' },
publishQuiet: true,
dryRun: false,
paths: ['@rerun.txt'],
parallel: 1
}
};
package.json
{
"name": "playwright_cucumber_automation",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"pretest": "node src/helper/report/init.js",
"test": "cucumber-js --config=config/cucumber.js|| exit 0",
"clean": "rm -rf test-results",
"test_siva": "cross-env ENV=prod FORCE_COLOR=0 cucumber-js --config=config/cucumber.js || true",
"report": "node src/helper/report/report.js",
"test:failed": "cucumber-js -p rerun @rerun.txt"
},
"keywords": [
"cucumber",
"cucumber-js",
"Playwright-cucumber"
],
"author": "Siva Kumar",
"license": "ISC",
"devDependencies": {
"@cucumber/cucumber": "^11.3.0",
"@playwright/test": "^1.53.0",
"@types/node": "^24.0.3",
"chromedriver": "^137.0.3",
"geckodriver": "^5.0.0",
"multiple-cucumber-html-reporter": "^3.9.2",
"playwright-bdd": "^8.3.0"
},
"dependencies": {
"fs-extra": "^11.3.0",
"winston": "^3.17.0"
}
}