From the course: Playwright: Design Patterns

Unlock this course with a free trial

Join today to access over 24,400 courses taught by industry experts.

Setting up Cucumber in your project

Setting up Cucumber in your project - Microsoft Playwright Tutorial

From the course: Playwright: Design Patterns

Setting up Cucumber in your project

- [Instructor] Now that we have written our BDD scenarios, it's time to implement them in our playwright project using Cucumber and TypeScript. This is where your scenarios come to life, turning those plain language steps into real executable tests. So first of all, I will install the Cucumber and ts-node so npm install --save-dev @cucumber/cucumber ts-node. So once it installs these two libraries, you can see them getting updated in the package, JSON. There you go. So now you have installed both of them. Let's move forward and create a cucumber.JSON file, which is the configuration for the cucumber. So in this configuration, I will specify where everything is basically. So for example, I want to tell Cucumber that my step files would be in the steps folder and they are ts files. Then my feature files are in the feature folder features, which is... And last but not least, I want to use TypeScript. So I need to acquire the module ts-node and I will register it so that I'm using…

Contents