You are on page 1of 2

What is the framework structure for Behaviour Driven Development (BDD)?

What is the folder structure for BDD?

.
.

<> ➡ Folder Structure ---->

Project/

├─── src/
│ ├─── test/
│ │ ├─── java/
│ │ │ ├─── stepDefinitions/
│ │ │ │ ├─── StepDefinitions.java
│ │ │ │ └─── ...
│ │ │ │
│ │ │ └─── runners/
│ │ │ ├─── TestRunner.java
│ │ │ └─── ...
│ │ │
│ │ └─── resources/
│ │ ├─── features/
│ │ │ ├─── Feature1.feature
│ │ │ ├─── Feature2.feature
│ │ │ └─── ...
│ │ │
│ │ └─── config/
│ │ └─── configuration.properties
│ │
│ └─── ...

└─── target/
└─── ...

<> ➡ Framework Explanation --->

<> src: This is the source directory containing all the code and resources
<> test: Contains the test-related code and resources
<> java: Java codebase
<> stepDefinitions: Contains step definition files defining actions for each step
in feature files
<> runners: Contains test runner classes responsible for executing the tests.
<> resources: Non-code resources
<> features: Directory for storing feature files written in Gherkin format. Each feature file
describes a set of scenarios
<> config: Configuration files for environment setup, such as configuration properties
<> target: This directory typically contains compiled code, test results, and other generated files
(this folder is often generated during build or test execution)

<> ➡ What are feature, step definition & runner files?


➡ Feature Files: features directory represent user stories or scenarios in Gherkin format
➡ Step Definitions: files in the stepDefinitions directory contain Java methods linked to Gherkin
steps
➡ Test Runners: classes define the execution flow of feature files and are typically configured
with Cucumber options

Happy Learning!!

Do follow for more such posts - Japneet Sachdeva

If you want to learn in similar easy to understand approach, then you can use my courses below
or refer to topmate.io profile, links below:

E-Books & Cheatsheets package with AI : https://lnkd.in/gusymgFi

QA & Automation with API testing interview prep E-Book: https://lnkd.in/gcWuCJmr

Full Stack QA Automation with AI & Generative prompt engineering: https://lnkd.in/dWjpT3-3

Complete Java E-Book with Coding problems for Interview Prep: https://lnkd.in/gpVWs-EF

Other important links -

Counseling & 1 on 1 calls - https://bit.ly/3xAjyB7

GitHub - https://lnkd.in/dy7AQD8f

YouTube - https://lnkd.in/dVZXYsQM

hashtag#japneetsachdeva

You might also like