DEV Community


Discussion on: CodeceptJs Setup & BDD

savitamaurya profile image
SavitaMaurya • Edited

Hi @haribhandari07 When I run the npx codeceptjs gherkin:snippets command no test steps are generating. I have scenario like this in the './features/*.feature'

Feature: Business rules

Scenario Outline: do something
Given I have a defined step currency
| currency | Header 2 | Header 3 |
| EUR | Value 2 | Value 3 |
| USD | Value 2 | Value 3 |

and existing step definition in './step_definitions/steps.js'

const { I } = inject();
// Add in your custom step files


"name": "codeceptTest",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"codeceptjs": "^2.6.5",
"puppeteer": "^4.0.0"
Output logs:

savitamaurya@savitamaurya-xx codeceptTest % npx codeceptjs gherkin:snippets
Debugger listening on ws://
For help, see:
Debugger attached.
Loaded 1 files
No new snippets found
Waiting for the debugger to disconnect...
savitamaurya@savitamaurya-xx codeceptTest %

Can you please suggest how to create step definitions for scenario outlines types example.

savitamaurya profile image

In the above step:
Given I have a defined step currency

currency is inside angular brackets but after posting here it's removing the brackets.pls note this

haribhandari07 profile image
Hari Bhandari Author • Edited

Hi, sorry for the late response. You need to add

gherkin: {
      features: './features/*.feature'

in your package.json file. Also, if you face more issues, compare your package.json file to mine.