Install cucumber tool in Nodejs

Firstly open the terminal after that move to the root folder of your Nodejs Project then write the below command.


npm install --save-dev cucumber

After installing the cucumber then you can check the package name in the package.json file.


  "devDependencies": {
    "cucumber": "^7.0.0-rc.0"
  }

After installing the package, firstly you have to create a features folder at the root of your project.
after creating the folder you can create a file with .feature extension.
like mytest.feature

Run the cucumber test cases

Now write the test cases and run the test cases through the below command


./node_modules/.bin/cucumber-js