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: Maven test
- [Instructor] Now that we got our test runner file working, how about we see all the tests running in action from Maven. What I'm going to do is navigate to the folder that has my project. So it's under eclipse-workspace, cucumbercourse, and right here, I have my pom file. So what I'm going to do is just copy the spot, go to Command Prompt, and here, I'm just going to cd to that folder. And I'll go ahead and run mvn test. And as you can see, Maven is able to detect our test files and our scenarios and it give us a nicely formatted output that showed us that there was one scenario, three steps and everything passed. The reason why it showed us the two tests here is because in Eclipse, I already have a test created when I created my project, and that's what ran. So I can get this of this test case. But the concept here is now that I have my test runner, my step definitions file and my feature file all glued together and working together, I can hook a big tool like Maven to run my tests.
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)
-
-
-
-
-
-