How to create Feature File

There are several approaches to create a feature file in different IDEs, here we are creating it in Eclipse IDE.

We can create a feature file with the ".feature" extension.

Following are the steps to create a feature file by using eclipse IDE:

1. In order to create a feature file in eclipse, go to the File option at the left side of the window then select New.

When you click the New, you will get the following three options:

  • Project
  • Example
  • Other

Select Other option from these three options.

Consider the following image:

How to create Feature File

2. After selecting Other option, you will get several options, from these options, select General < File option, and then click Next.

Consider the following image:

How to create Feature File

3. After clicking the Next, select the project inside which you want to create a feature file.

After selecting the project, you can create a feature file by giving a name and ".feature" extension. You can provide any name to the feature file on your own choice. After providing a name, click on the Finish button.

Consider the following image:

How to create Feature File

4. Now, the created feature file will appear inside the project.

Consider the following image:

How to create Feature File

The generated feature file will be similar to the above image. In it, we can write features, scenarios, and feature description of the web application to be tested.






Latest Courses