- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to create a step definition file for Cucumber in Java?
We can create a step definition file for Cucumber. This can be done using the below steps −
Step1− Click on the File menu in Eclipse. Then select the option New. Next click on Other
Step2− Click on Maven Project from the Maven folder. Then click on Next.
Step3− Proceed with the further steps.
Step4− Select maven-achetype-quickstart template. Then click on Next.
Step5− Add GroupId as Automation, Artifact Id as Cucumber, and proceed.
Step6− A project should get created with a Cucumber-type project structure. The Cucumber-related scripts should be written within the src/test/java folder.
Step7− Create a new package called stepDefinations inside the src/test/java folder.
Step8− Create a Java class file within the stepDefinations package. Right-click the stepDefinations package, then select option New->Class.
Step9− Give a Java class file name, say stepDefination, then click on Finish.
- Related Articles
- How to map a step definition to a feature file in Cucumber?
- How to auto-generate a step definition to a feature file in Cucumber?
- How to create a Feature file for Cucumber in Java?
- How to create a test runner file for Cucumber in Java?
- How to run tests using a test runner file for Cucumber?
- Explain a Step Definition in SpecFlow.
- How to create a pdf file in Java?
- How to create a Cucumber project template using Maven in Eclipse?
- How to create FileFilter for JFileChooser in Java and display File Type accordingly?
- How to Write/create a JSON file using Java?
- How to create a step histogram using ggplot2 in R?
- How to create a project with Cucumber and Rest Assured dependencies?
- Create a temporary file in Java
- How to create and write JSON array to a file in java?
- How to create a new directory by using File object in Java?
