<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Cucumber on Osmar Petry</title><link>https://osmarpetry.dev/tags/cucumber/</link><description>Recent content in Cucumber on Osmar Petry</description><generator>Hugo</generator><language>en-US</language><lastBuildDate>Wed, 15 Jan 2025 00:00:00 +0000</lastBuildDate><atom:link href="https://osmarpetry.dev/tags/cucumber/rss.xml" rel="self" type="application/rss+xml"/><item><title>Behavior-Driven Development (BDD)</title><link>https://osmarpetry.dev/blog/bdd/</link><pubDate>Wed, 15 Jan 2025 00:00:00 +0000</pubDate><guid>https://osmarpetry.dev/blog/bdd/</guid><description>&lt;h2 id="what-is-bdd"&gt;What Is BDD&lt;/h2&gt;&#10;&lt;p&gt;BDD bridges the gap between business stakeholders and developers by expressing requirements as executable specifications. Instead of writing tests after the fact, you describe the &lt;strong&gt;expected behavior&lt;/strong&gt; of the system in plain language, then automate those descriptions.&lt;/p&gt;&#10;&lt;p&gt;The core loop: &lt;strong&gt;Discovery&lt;/strong&gt; (what should the system do?) → &lt;strong&gt;Formulation&lt;/strong&gt; (write it in Gherkin) → &lt;strong&gt;Automation&lt;/strong&gt; (implement step definitions).&lt;/p&gt;&#10;&lt;h2 id="bdd-vs-tdd"&gt;BDD vs TDD&lt;/h2&gt;&#10;&lt;p&gt;TDD focuses on unit-level correctness (&amp;ldquo;does this function return the right value?&amp;rdquo;). BDD focuses on system-level behavior (&amp;ldquo;does this feature work from the user&amp;rsquo;s perspective?&amp;rdquo;). In practice they complement each other — use TDD for internal logic, BDD for acceptance and integration tests.&lt;/p&gt;</description></item></channel></rss>