From the course: Cucumber Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Step definitions: Testing scenario

Step definitions: Testing scenario

From the course: Cucumber Essential Training

Start my 1-month free trial

Step definitions: Testing scenario

- [Presenter] So our developmenting has implemented all the three methods in our step definitions file. We have the first method, where they're adding a restaurant menu item with name, description and price. In the second step, they define the location menu which is of the type restaurant menu. Let me show you that class. This class holds an array list of menu items or restaurant menu items and it has a method that allows you to add a menu item to that array list. Let's go back to the step definitions file and the last method is where its checking if an item exists. So the item which is added in this method, which is I add that menu item, should be available in the location menu object and that's what it tests. For each of these steps we have some Sys.out, so you can see some messages and some values. So lets go ahead and run our feature file and see what happens. I'm going to minimize this from the feature file and if you see in the output all the three steps ran and we have those…

Contents