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
From the course: Cucumber Essential Training
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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
(Locked)
User story session: The problem domain2m 16s
-
(Locked)
User story session: Concrete examples2m 23s
-
Feature file7m 19s
-
(Locked)
Step definitions: Generate code3m 29s
-
(Locked)
Step definitions: First domain object2m 14s
-
(Locked)
Step definitions: Next scenario step3m
-
(Locked)
Step definitions: Testing scenario2m 1s
-
(Locked)
Running a test: Create a test runner4m 45s
-
(Locked)
Running a test: Maven test1m 31s
-
(Locked)
-
-
-
-
-
-