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.

Running a test: Create a test runner

Running a test: Create a test runner

From the course: Cucumber Essential Training

Start my 1-month free trial

Running a test: Create a test runner

- [Instructor] So, let's go ahead and implement our test runner. I'm going to add a new package here. And call it TestRunners and add my class here. A TestRunner class here is just a plain and simple Java class, so I'm just going to call it MenuManagementTest. Click Finish here and there are a couple of things we need to do first for making this class run our Cucumber tests. First thing I'm going to do is define this annotation. RunWith Cucumber.class and it will import a Cucumber API JUnit for us. Let's go ahead and save this. The next thing I'm going to do here is to define a few Cucumber options. Let's fix this, Options and supply a bunch of parameters. So, this is the class that's going to link my feature file so I'm going to add another import here, so the first thing I am going to do and let's specify a path. the path is source/test/java you would use this path, otherwise, you could just leave it at features, so I think that's better at this path. is define glue parameter of the…

Contents