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

Running a test: Maven test

From the course: Cucumber Essential Training

Start my 1-month free trial

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.

Contents