Join Shashi Shekhar for an in-depth discussion in this video Create a Maven project, part of Cucumber Essential Training.
- [Instructor] So now that we have all the installations done, let's go ahead and create our Cucumber project. I'll go ahead and launch Eclipse, select default workspace. And once Eclipse is up and running, I'll close the welcome screen. Click File, New, and select Other. I'm going to select Maven project, click Next, use the default workspace location, click Next, and use the quick start Maven project. This is a very simple project that we're going to use to create our Cucumber test scenarios and step definitions. Let's go ahead and click Next. For the group ID, I'm going to use LinkedIn Learning. And for the artifact ID, the name will be Cucumber Course. The default package for the objects in this project will be LinkedInLearning.CucumberCourse. Click finish to create the project. Since we are using a Maven project, it has created a nice structure for us. We already have the source files here under src/main/java and the test files under sr/test/java. Now one great thing you get with working with Maven is all the dependencies can be downloaded on the fly by using the dependencies provided in the pom or project object model.xml file. So I need the dependencies to the Cucumber jar files. Cucumber for Java is a collection of Cucumber Java archive files. And I'm going to add those dependencies now. The easiest way to do this is to go to what is known as the GitHub Java Skeleton Project. Navigate to its pom.xml file and just copy the dependencies from there. I'll copy these dependencies, go back to Eclipse, and paste the dependencies here. In fact, I'm going to override it. And I have my dependencies here. I also need a few project properties. So let's go back to the GitHub link and copy project properties. These properties are referenced in the dependencies. So let's go back here under project properties and let's add these here. And once we save this file, I have all the Cucumber dependencies available to me. There's one additional thing I need to do, when I run Maven in stand alone mode, that I need to include Maven compiler source and target to make sure we can run Maven in stand alone mode. I'm going to do that. And this going to be 1.7. And let's add the target here. I have the Maven compiler source here. I'm going to add the target. And save this file. The next thing I need to do is just format everything so it looks nice and clean. Save the file again and we are all set.
- How Cucumber can be used for BDD, TDD, and ATDD
- Installing and configuring Cucumber
- Mapping user stories to features
- Adding hooks
- Generating reports
- Adding a data table
- Adding Selenium dependencies
- Applying techniques to make BDD maintainable
Skill Level Intermediate
Robot Framework Test Automation: Level 1 (Selenium)with Bryan Lamb6h 23m Intermediate
1. Behavior-Driven Development
2. Cucumber Workflow
3. Regular Expressions Match
4. Additional Cucumber Concepts
5. Data Table and Scenario Outline
6. Cucumber Advance Features
Next steps1m 7s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.