{"id":9867,"date":"2021-06-30T18:04:34","date_gmt":"2021-06-30T12:34:34","guid":{"rendered":"https:\/\/www.h2kinfosys.com\/blog\/?p=9867"},"modified":"2025-11-19T02:40:59","modified_gmt":"2025-11-19T07:40:59","slug":"bdd-behaviour-driven-development","status":"publish","type":"post","link":"https:\/\/www.h2kinfosys.com\/blog\/bdd-behaviour-driven-development\/","title":{"rendered":"BDD Behaviour Driven Development"},"content":{"rendered":"\n<p>Behaviour Driven Development (BDD) has revolutionized the way software teams communicate, collaborate, and deliver high-quality applications. In a world where software systems must perform flawlessly across web, mobile, APIs, and cloud environments, BDD brings clarity and transparency to the entire development life cycle.<\/p>\n\n\n\n<p>Whether you\u2019re a beginner, an aspiring tester, or someone taking a <strong><a href=\"https:\/\/www.h2kinfosys.com\/courses\/qa-online-training-course-details\/\">Software testing and quality assurance course<\/a><\/strong>, understanding BDD is essential because modern QA teams expect testers to write clear, business-driven, automation-ready scenarios using tools like Cucumber, Behave, SpecFlow, and JBehave.<\/p>\n\n\n\n<p>This comprehensive guide explains everything you need to know about BDD, how it works, why it matters, real-world examples, step-by-step workflow, and example images you can use for your blog.<\/p>\n\n\n\n<p> software and it helps teams to have a right communication at the proper time as we can minimise the time for meetings and utilise the time to produce amount of valuable code.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>What Is BDD? (Behaviour Driven Development)<\/strong><\/h2>\n\n\n\n<p>Behaviour Driven Development is an <strong>agile software development practice<\/strong> that focuses on improving communication between business teams and technical teams. It ensures everyone developers, testers, product owners, and stakeholders understands the system behavior in simple <strong>human-readable language<\/strong>.<\/p>\n\n\n\n<p>BDD follows a simple philosophy:<\/p>\n\n\n\n<p><strong>If the business can describe it, the development team can build it, and the QA team can test it.<\/strong><\/p>\n\n\n\n<p>Instead of writing test cases in technical language, BDD uses a structured, natural language style known as <strong>Gherkin<\/strong>, which makes scenarios easy to read and understand.<\/p>\n\n\n\n<h1 class=\"wp-block-heading\"><strong>Example Image 1 \u2013 BDD at a Glance<\/strong><\/h1>\n\n\n\n<p><strong>(Insert an image similar to the following description):<\/strong><\/p>\n\n\n\n<p><strong>Image Description:<\/strong><br>A flow diagram with three boxes:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Business Team<\/strong> \u2192 Provides user stories<\/li>\n\n\n\n<li><strong>Development Team<\/strong> \u2192 Implements code<\/li>\n\n\n\n<li><strong>QA Team<\/strong> \u2192 Validates behaviors with automated tests<br>All three arrows connect to the center text <strong>\u201cBDD Scenarios (Given-When-Then)<\/strong>.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>2. Why Do Modern QA Teams Prefer BDD?<\/strong><\/h2>\n\n\n\n<p>Today\u2019s testing environments require more clarity, speed, and collaboration. Traditional testing often leads to:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Miscommunication<\/li>\n\n\n\n<li>Incorrect assumptions<\/li>\n\n\n\n<li>Missing requirements<\/li>\n\n\n\n<li>Testing gaps<\/li>\n<\/ul>\n\n\n\n<p>BDD solves this by creating <strong>one shared language<\/strong> between business and technical members.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Benefits of BDD<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u2714 <strong>Improved collaboration<\/strong> between QA, developers, and business analysts<\/li>\n\n\n\n<li>\u2714 <strong>Reduced rework<\/strong> due to early clarity<\/li>\n\n\n\n<li>\u2714 <strong>Living documentation<\/strong> updated automatically from tests<\/li>\n\n\n\n<li>\u2714 <strong>Fast automation support<\/strong> using Cucumber\/Selenium<\/li>\n\n\n\n<li>\u2714 <strong>Higher quality software<\/strong> with fewer defects<\/li>\n\n\n\n<li>\u2714 <strong>Clearer acceptance criteria<\/strong><\/li>\n<\/ul>\n\n\n\n<p>If you&#8217;re enrolled in a <strong>Quality assurance tester course<\/strong>, you will learn how BDD strengthens QA automation and requirements analysis.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>3. Key Concepts in BDD<\/strong><\/h2>\n\n\n\n<p>BDD is built on three pillars:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>3.1 User Stories<\/strong><\/h3>\n\n\n\n<p>A user story describes what the user wants and why.<\/p>\n\n\n\n<p><strong>Example:<\/strong><br><em>As a customer, I want to log into my account so that I can view my profile.<\/em><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>3.2 Acceptance Criteria<\/strong><\/h3>\n\n\n\n<p>These are the conditions that must be true for the story to be accepted.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>3.3 Gherkin Syntax<\/strong><\/h3>\n\n\n\n<p>The heart of BDD is the <strong>Given-When-Then<\/strong> format.<\/p>\n\n\n\n<p><strong>Given<\/strong> \u2192 initial context<br><strong>When<\/strong> \u2192 event\/action<br><strong>Then<\/strong> \u2192 expected outcome<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>4. BDD Scenario Example (Login Feature)<\/strong><\/h2>\n\n\n\n<p><strong>Feature: User login<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Scenario: Successful login with valid credentials\n  Given the user is on the login page\n  When the user enters valid username and password\n  And clicks the login button\n  Then the user should be redirected to the dashboard\n<\/pre>\n\n\n\n<p>Even a non-technical stakeholder can understand this.<\/p>\n\n\n\n<h1 class=\"wp-block-heading\"><strong>Example Image 2 \u2013 Gherkin Example Box<\/strong><\/h1>\n\n\n\n<p><strong>(Insert an image based on this description):<\/strong><\/p>\n\n\n\n<p><strong>Image Description:<\/strong><br>A white code-style box showing Given-When-Then steps with syntax highlighting. A left sidebar shows:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Feature<\/li>\n\n\n\n<li>Scenario<\/li>\n\n\n\n<li>Steps<\/li>\n<\/ul>\n\n\n\n<p>This visually represents a BDD scenario.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>5. How Does BDD Work in a Real Project? (Step-by-Step Workflow)<\/strong><\/h2>\n\n\n\n<p>BDD follows a structured <strong>three-step workflow<\/strong>:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 1: DISCOVERY \u2013 Identify Behaviors<\/strong><\/h3>\n\n\n\n<p>Teams collaborate to discuss:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>What should the system do?<\/li>\n\n\n\n<li>What will the user experience look like?<\/li>\n\n\n\n<li>What edge cases must be covered?<\/li>\n<\/ul>\n\n\n\n<p>This step involves:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Product owners<\/li>\n\n\n\n<li>Developers<\/li>\n\n\n\n<li>QA testers<\/li>\n<\/ul>\n\n\n\n<p>This is typically done through:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Requirement workshops<\/li>\n\n\n\n<li>Example mapping sessions<\/li>\n\n\n\n<li>Story refinement meetings<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 2: DEFINITION \u2013 Write Gherkin Scenarios<\/strong><\/h3>\n\n\n\n<p>Once behaviors are discussed, testers write <strong>clear scenarios<\/strong> in Gherkin.<\/p>\n\n\n\n<p>Example:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Scenario: Add product to shopping cart\n  Given the user is viewing a product\n  When the user clicks \"Add to Cart\"\n  Then the product should appear in the cart\n<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 3: AUTOMATION \u2013 Implement the Steps<\/strong><\/h3>\n\n\n\n<p>Developers write code to bind the Gherkin steps with automated scripts.<\/p>\n\n\n\n<p>Example (Cucumber Java):<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">@When(\"the user clicks Add to Cart\")\npublic void clickAddToCart() {\n   driver.findElement(By.id(\"cart\")).click();\n}\n<\/pre>\n\n\n\n<p>BDD tools act like a bridge between <strong>plain English<\/strong> and <strong>automation code<\/strong>.<\/p>\n\n\n\n<h1 class=\"wp-block-heading\"><strong>Example Image 3 \u2013 BDD Workflow (Three Circles)<\/strong><\/h1>\n\n\n\n<p><strong>(Insert an image matching this description):<\/strong><\/p>\n\n\n\n<p><strong>Image Description:<\/strong><br>Three circles arranged horizontally:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Discovery<\/strong> \u2013 collaboration with stakeholders<\/li>\n\n\n\n<li><strong>Definition<\/strong> \u2013 writing Gherkin scenarios<\/li>\n\n\n\n<li><strong>Automation<\/strong> \u2013 converting to automated tests<\/li>\n<\/ol>\n\n\n\n<p>Arrows connect each step in a smooth cycle.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>6. BDD Tools You Should Know<\/strong><\/h2>\n\n\n\n<p>If you are pursuing a <strong>Software testing and quality assurance course<\/strong>, you will work with these modern BDD tools:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>1. Cucumber<\/strong><\/h3>\n\n\n\n<p>Most popular BDD automation tool.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>2. SpecFlow<\/strong><\/h3>\n\n\n\n<p>For .NET automation.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>3. Behave<\/strong><\/h3>\n\n\n\n<p>For Python-based BDD.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>4. JBehave<\/strong><\/h3>\n\n\n\n<p>Java-based BDD framework.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>5. Gauge<\/strong><\/h3>\n\n\n\n<p>Lightweight and flexible.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>6. Serenity BDD<\/strong><\/h3>\n\n\n\n<p>Makes reports more beautiful and readable.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>7. BDD vs TDD \u2013 What\u2019s the Difference?<\/strong><\/h2>\n\n\n\n<p>Many students confuse Test Driven Development (TDD) with Behaviour Driven Development (BDD).<\/p>\n\n\n\n<p>Here\u2019s a simple comparison:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><strong>TDD<\/strong><\/th><th><strong>BDD<\/strong><\/th><\/tr><\/thead><tbody><tr><td>Developer-focused<\/td><td>Business-focused<\/td><\/tr><tr><td>Tests written first<\/td><td>Behaviors discussed first<\/td><\/tr><tr><td>Unit tests<\/td><td>Acceptance tests<\/td><\/tr><tr><td>Code-driven<\/td><td>User-behavior-driven<\/td><\/tr><tr><td>Less readable<\/td><td>Highly readable<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>BDD is becoming the preferred approach in most QA teams because of its <strong>clarity and collaboration benefits<\/strong>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>8. Real-World BDD Examples<\/strong><\/h2>\n\n\n\n<p>Here are simple practical examples used in real applications.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Example A: E-commerce Checkout<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\">Scenario: Apply discount coupon at checkout\n  Given the user has items in the cart\n  And the user has a valid coupon code\n  When the user enters the coupon code\n  Then the discount should be applied to the total amount\n<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Example B: Banking \u2013 Funds Transfer<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\">Scenario: Transfer funds to another account\n  Given the user is logged into their bank account\n  When the user enters a valid recipient account number\n  And enters the transfer amount\n  Then the transfer should be completed successfully\n<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Example C: Healthcare \u2013 Appointment Booking<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\">Scenario: Book a doctor appointment\n  Given the patient is registered\n  When they select a doctor and time slot\n  Then the booking should be confirmed\n<\/pre>\n\n\n\n<p>These are exactly the scenarios you practice in a <strong>Quality assurance tester course<\/strong>, which helps beginners understand real industry workflows.<\/p>\n\n\n\n<h1 class=\"wp-block-heading\"><strong>Example Image 4 \u2013 Real-World BDD Use Case Diagram<\/strong><\/h1>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Image Description:<\/strong><\/li>\n\n\n\n<li>A vertical list with icons:<\/li>\n\n\n\n<li>E-commerce<\/li>\n\n\n\n<li>Banking<\/li>\n\n\n\n<li>Healthcare<\/li>\n\n\n\n<li>EdTech<\/li>\n\n\n\n<li>Transport apps<\/li>\n\n\n\n<li>Each icon leads to small Given-When-Then examples.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>9When Should You Use BDD? (Best Use Cases)<\/strong><\/h2>\n\n\n\n<p>BDD is ideal when:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Business rules are complex<\/li>\n\n\n\n<li>Continuous collaboration is required<\/li>\n\n\n\n<li>Acceptance criteria often change<\/li>\n\n\n\n<li>You want automation-ready requirements<\/li>\n\n\n\n<li>You need living documentation<\/li>\n<\/ul>\n\n\n\n<p>BDD is commonly used in:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Banking<\/li>\n\n\n\n<li>FinTech<\/li>\n\n\n\n<li>Healthcare<\/li>\n\n\n\n<li>eCommerce<\/li>\n\n\n\n<li>Travel &amp; logistics<\/li>\n\n\n\n<li>Enterprise SaaS apps<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Common BDD Mistakes to Avoid (Important for QA Beginners)<\/strong><\/h2>\n\n\n\n<p>Everyone likes BDD, but not everyone gets it right. Here are mistakes to avoid:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Writing overly detailed scenarios<\/li>\n\n\n\n<li>Using technical language instead of user language<\/li>\n\n\n\n<li>Writing scenarios without business input<\/li>\n\n\n\n<li>Using BDD only as a test automation framework<\/li>\n\n\n\n<li>Having too many scenarios for a single user story<\/li>\n\n\n\n<li>Not reviewing features before automation<\/li>\n<\/ul>\n\n\n\n<p>For beginners taking a <strong>Software testing and quality assurance course<\/strong>, these pitfalls are <a href=\"https:\/\/en.wikipedia.org\/wiki\/Deep_Cover_(2025_film)\" rel=\"nofollow noopener\" target=\"_blank\">covered deeply<\/a> with hands-on practice.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>How BDD Helps QA Testers Grow Faster<\/strong><\/h2>\n\n\n\n<p>Today\u2019s QA roles expect testers to:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>understand requirements clearly<\/li>\n\n\n\n<li>collaborate in agile environments<\/li>\n\n\n\n<li>write Gherkin scenarios<\/li>\n\n\n\n<li>contribute to automation<\/li>\n<\/ul>\n\n\n\n<p>BDD helps you:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>write clean test cases<\/li>\n\n\n\n<li>improve communication<\/li>\n\n\n\n<li>reduce defects<\/li>\n\n\n\n<li>produce better test coverage<\/li>\n\n\n\n<li>build automation-friendly tests<\/li>\n<\/ul>\n\n\n\n<p>This is why every modern <strong>Quality assurance tester course<\/strong> includes BDD modules with real projects using Cucumber.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Sample BDD Folder Structure (Real Project Example)<\/strong><\/h2>\n\n\n\n<pre class=\"wp-block-preformatted\">\/BDD-Framework\n  \/features\n      login.feature\n      cart.feature\n  \/stepDefinitions\n      LoginSteps.java\n      CartSteps.java\n  \/testRunner\n      TestRunner.java\n  \/utilities\n      BrowserFactory.java\n      ConfigReader.java\n<\/pre>\n\n\n\n<p>This structure is common in Selenium+Cucumber frameworks.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>How to setup selenium cucumber Java BDD Framework?<\/strong><\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Goto eclipse to create a project<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><img fetchpriority=\"high\" decoding=\"async\" width=\"565\" height=\"271\" src=\"https:\/\/www.h2kinfosys.com\/blog\/wp-content\/uploads\/2021\/06\/image-5.png\" alt=\"\" class=\"wp-image-9869\" title=\"\" srcset=\"https:\/\/www.h2kinfosys.com\/blog\/wp-content\/uploads\/2021\/06\/image-5.png 565w, https:\/\/www.h2kinfosys.com\/blog\/wp-content\/uploads\/2021\/06\/image-5-300x144.png 300w\" sizes=\"(max-width: 565px) 100vw, 565px\" \/><\/figure>\n\n\n\n<ol start=\"2\" class=\"wp-block-list\">\n<li>Create a Maven Project in all latest version of eclipse, maven plug in is installed so that option is found.<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"478\" height=\"287\" src=\"https:\/\/www.h2kinfosys.com\/blog\/wp-content\/uploads\/2021\/06\/image-6.png\" alt=\"\" class=\"wp-image-9870\" title=\"\" srcset=\"https:\/\/www.h2kinfosys.com\/blog\/wp-content\/uploads\/2021\/06\/image-6.png 478w, https:\/\/www.h2kinfosys.com\/blog\/wp-content\/uploads\/2021\/06\/image-6-300x180.png 300w\" sizes=\"(max-width: 478px) 100vw, 478px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"556\" height=\"267\" src=\"https:\/\/www.h2kinfosys.com\/blog\/wp-content\/uploads\/2021\/06\/image-7.png\" alt=\"\" class=\"wp-image-9871\" title=\"\" srcset=\"https:\/\/www.h2kinfosys.com\/blog\/wp-content\/uploads\/2021\/06\/image-7.png 556w, https:\/\/www.h2kinfosys.com\/blog\/wp-content\/uploads\/2021\/06\/image-7-300x144.png 300w\" sizes=\"(max-width: 556px) 100vw, 556px\" \/><\/figure>\n\n\n\n<p>Give the group Id and artefact id and click finish<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"545\" height=\"306\" src=\"https:\/\/www.h2kinfosys.com\/blog\/wp-content\/uploads\/2021\/06\/image-8.png\" alt=\"\" class=\"wp-image-9872\" title=\"\" srcset=\"https:\/\/www.h2kinfosys.com\/blog\/wp-content\/uploads\/2021\/06\/image-8.png 545w, https:\/\/www.h2kinfosys.com\/blog\/wp-content\/uploads\/2021\/06\/image-8-300x168.png 300w, https:\/\/www.h2kinfosys.com\/blog\/wp-content\/uploads\/2021\/06\/image-8-390x220.png 390w\" sizes=\"(max-width: 545px) 100vw, 545px\" \/><\/figure>\n\n\n\n<p>Finally the project is created<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"596\" height=\"331\" src=\"https:\/\/www.h2kinfosys.com\/blog\/wp-content\/uploads\/2021\/06\/image-9.png\" alt=\"\" class=\"wp-image-9873\" title=\"\" srcset=\"https:\/\/www.h2kinfosys.com\/blog\/wp-content\/uploads\/2021\/06\/image-9.png 596w, https:\/\/www.h2kinfosys.com\/blog\/wp-content\/uploads\/2021\/06\/image-9-300x167.png 300w\" sizes=\"(max-width: 596px) 100vw, 596px\" \/><\/figure>\n\n\n\n<p>We have feature file and we have project structure:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"596\" height=\"241\" src=\"https:\/\/www.h2kinfosys.com\/blog\/wp-content\/uploads\/2021\/06\/image-10.png\" alt=\"\" class=\"wp-image-9874\" title=\"\" srcset=\"https:\/\/www.h2kinfosys.com\/blog\/wp-content\/uploads\/2021\/06\/image-10.png 596w, https:\/\/www.h2kinfosys.com\/blog\/wp-content\/uploads\/2021\/06\/image-10-300x121.png 300w\" sizes=\"(max-width: 596px) 100vw, 596px\" \/><\/figure>\n\n\n\n<p>We have pom.xml where maven dependencies are installed and selenium java dependencies have to be added<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"624\" height=\"253\" src=\"https:\/\/www.h2kinfosys.com\/blog\/wp-content\/uploads\/2021\/06\/image-11.png\" alt=\"\" class=\"wp-image-9875\" title=\"\" srcset=\"https:\/\/www.h2kinfosys.com\/blog\/wp-content\/uploads\/2021\/06\/image-11.png 624w, https:\/\/www.h2kinfosys.com\/blog\/wp-content\/uploads\/2021\/06\/image-11-300x122.png 300w\" sizes=\"(max-width: 624px) 100vw, 624px\" \/><\/figure>\n\n\n\n<p>Selenium java dependencies from internet.<\/p>\n\n\n\n<p>Now create a feature file and add scenario. Goto features folder.<\/p>\n\n\n\n<p>Click new then select file give file name to test login<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"524\" height=\"256\" src=\"https:\/\/www.h2kinfosys.com\/blog\/wp-content\/uploads\/2021\/06\/image-12.png\" alt=\"\" class=\"wp-image-9876\" title=\"\" srcset=\"https:\/\/www.h2kinfosys.com\/blog\/wp-content\/uploads\/2021\/06\/image-12.png 524w, https:\/\/www.h2kinfosys.com\/blog\/wp-content\/uploads\/2021\/06\/image-12-300x147.png 300w\" sizes=\"(max-width: 524px) 100vw, 524px\" \/><\/figure>\n\n\n\n<p>Write the scenarios and arrange in pretty format<\/p>\n\n\n\n<p><br>3. Run the feature file<\/p>\n\n\n\n<p>Create the test runner file then write the code. If we run the testrunner class then we can see the output as scenario got passed. By creating the testrunner class we can run the feature files as per our requirement whatever features we want along with reporting, we can add and test it.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Association of BDD with Agile:<\/strong><\/h2>\n\n\n\n<p>The Behaviour Driven Development is a way of writing the proper requirements which can be automatically turned into code for agile developers to automate testing that feature.<\/p>\n\n\n\n<p>The agile requirements:<\/p>\n\n\n\n<p>User stories became more and more famous tool to write requirements. The standard format of user stories is as below:<\/p>\n\n\n\n<p><strong>As a[user role]<\/strong><\/p>\n\n\n\n<p><strong>I want [some action]<\/strong><\/p>\n\n\n\n<p><strong>So [goal]<\/strong><\/p>\n\n\n\n<p>Quite often user stories look like<\/p>\n\n\n\n<p><strong>As a user<\/strong><\/p>\n\n\n\n<p><strong>Want to login into application<\/strong><\/p>\n\n\n\n<p><strong>So I will be logged in<\/strong><\/p>\n\n\n\n<p>These user stories for simple requirements as authentication is waste of time and also shows the most common mistake which was observed in many teams starting adventure with BDD or Agile requirements.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>How to write a good user story using 3 components?&nbsp;<\/strong><\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Who requires it? What is required? and Why is it required? these questions provide context for the user story<\/li>\n<\/ol>\n\n\n\n<ol start=\"2\" class=\"wp-block-list\">\n<li>Acceptance criteria, this specifies the required functionality for the particular user story<\/li>\n<\/ol>\n\n\n\n<ol start=\"3\" class=\"wp-block-list\">\n<li>Supporting models, these are supporting documents for analysis models.<\/li>\n<\/ol>\n\n\n\n<p>For example,<\/p>\n\n\n\n<p>Here, Jack is a BA working with a client running a Restaurant called \u201cMeals on Wheels\u201d. They need a mobile app which has a feature for customers to book a table. Here we have to write a proper user story which involves features like:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Register<\/li>\n\n\n\n<li>Login<\/li>\n\n\n\n<li>Table booking<\/li>\n\n\n\n<li>Confirmation message once booking is confirmed in the system<\/li>\n\n\n\n<li>Display only available time slots to customer.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Final Thoughts:<\/strong><\/h2>\n\n\n\n<p><br>It encourages teams to build software <strong>the right way<\/strong>, with clarity, shared understanding, and excellent collaboration. For QA professionals, BDD is a powerful skill that enhances your ability to test efficiently and communicate effectively with product owners and developers.<\/p>\n\n\n\n<p>If you&#8217;re learning through a <strong><a href=\"https:\/\/www.h2kinfosys.com\/courses\/qa-online-training-course-details\/\">Quality assurance tester course<\/a><\/strong>, mastering BDD will make you job-ready with real-world testing skills.<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Behaviour Driven Development (BDD) has revolutionized the way software teams communicate, collaborate, and deliver high-quality applications. In a world where software systems must perform flawlessly across web, mobile, APIs, and cloud environments, BDD brings clarity and transparency to the entire development life cycle. Whether you\u2019re a beginner, an aspiring tester, or someone taking a Software [&hellip;]<\/p>\n","protected":false},"author":20,"featured_media":32160,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[],"class_list":["post-9867","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-qa-tutorials"],"_links":{"self":[{"href":"https:\/\/www.h2kinfosys.com\/blog\/wp-json\/wp\/v2\/posts\/9867","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.h2kinfosys.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.h2kinfosys.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.h2kinfosys.com\/blog\/wp-json\/wp\/v2\/users\/20"}],"replies":[{"embeddable":true,"href":"https:\/\/www.h2kinfosys.com\/blog\/wp-json\/wp\/v2\/comments?post=9867"}],"version-history":[{"count":1,"href":"https:\/\/www.h2kinfosys.com\/blog\/wp-json\/wp\/v2\/posts\/9867\/revisions"}],"predecessor-version":[{"id":32159,"href":"https:\/\/www.h2kinfosys.com\/blog\/wp-json\/wp\/v2\/posts\/9867\/revisions\/32159"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.h2kinfosys.com\/blog\/wp-json\/wp\/v2\/media\/32160"}],"wp:attachment":[{"href":"https:\/\/www.h2kinfosys.com\/blog\/wp-json\/wp\/v2\/media?parent=9867"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.h2kinfosys.com\/blog\/wp-json\/wp\/v2\/categories?post=9867"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.h2kinfosys.com\/blog\/wp-json\/wp\/v2\/tags?post=9867"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}