Create a new directory called cucumber-js and change into it. The rest of tutorial assumes that you are in this directory. Cucumber-js is available as an npm package. This allows me to install it using npm install cucumber Cucumber.js is a testing library that allows you to write your tests in plain language. It follows the given-when-then structure, but as you'll see the tests are very readable. Even by business users. This allows your tests to be a point of communication and collaboration Once installed, the executable will be./node_modules/.bin/cucumber.js. When you run it, it needs to know where on the file system it can find all of its required files. These are both the Gherkin..
Now that we have created a feature file and step definitions, we can integrate our Cucumber JS test case into BrowserStack. We now create a hooks.js and env.js file, as shown below: // hooks.js var config_file = './../conf/ ' + ( process . env Above is the cucumber feature file which performs the addition of two numbers and printing their result in the console. Now coming to the implementation of their step definition by using Java programming. First, create a new package then create a new Java class where you will keep the step definition's implementation