<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>BDD on Coffee-Driven Development</title>
    <link>https://duijzer.com/tags/bdd/</link>
    <description>Recent content in BDD on Coffee-Driven Development</description>
    <generator>Hugo</generator>
    <language>en</language>
    <copyright>© {currentYear}, Jacob Duijzer. All rights reserved</copyright>
    <lastBuildDate>Wed, 12 Feb 2025 16:01:27 +0100</lastBuildDate>
    <atom:link href="https://duijzer.com/tags/bdd/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Testing GraphQL with Specifications: A Deep Dive with Reqnroll</title>
      <link>https://duijzer.com/posts/testing-graphql-with-specifications/</link>
      <pubDate>Tue, 28 Jan 2025 00:00:00 +0000</pubDate>
      <guid>https://duijzer.com/posts/testing-graphql-with-specifications/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://graphql.org&#34;&gt;GraphQL&lt;/a&gt; has been around since 2012, yet many developers haven’t had the chance to work with it. Personally, I’ve been using GraphQL on and off for several years, both in personal and professional projects. Recently, I’ve been diving deeper into it again—and I’ve fallen in love with it all over.&lt;/p&gt;&#xA;&lt;p&gt;While implementing a few queries and mutations, I started to wonder: how could I effectively test my GraphQL implementation? Specifically, how could I send queries and mutations with a GraphQL client directly from my tests to ensure everything works as expected?&lt;/p&gt;&#xA;&lt;p&gt;After some experimentation, I found a solution I’m excited to share: combining specifications with &lt;a href=&#34;https://reqnroll.net/&#34;&gt;Reqnroll&lt;/a&gt;, the .NET &lt;a href=&#34;https://learn.microsoft.com/en-us/aspnet/core/test/integration-tests?view=aspnetcore-9.0&#34;&gt;WebApplicationFactory&lt;/a&gt;, and the &lt;a href=&#34;https://chillicream.com/docs/strawberryshake/v14&#34;&gt;Strawberry Shake GraphQL client&lt;/a&gt; to test a &lt;a href=&#34;https://chillicream.com/docs/hotchocolate/v14&#34;&gt;Hot Chocolate GraphQL server&lt;/a&gt;. This approach not only works seamlessly but also results in clean, readable specifications.&lt;/p&gt;&#xA;&lt;p&gt;In this article, I’ll guide you through the process of setting up these tests, allowing you to test your own GraphQL server with clarity and confidence. Let’s get started!&lt;/p&gt;</description>
    </item>
    <item>
      <title>Specflow and Eventual Consistency</title>
      <link>https://duijzer.com/posts/specflow-eventual-consistency/</link>
      <pubDate>Sun, 30 May 2021 20:25:11 +0200</pubDate>
      <guid>https://duijzer.com/posts/specflow-eventual-consistency/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://specflow.org/&#34;&gt;SpecFlow&lt;/a&gt; is a tool which can be used to describe test scenarios and automate the tests. Although I have been using SpecFlow for a while now I never used it for advanced examples where time might be an issue. Lets show a simple example scenario first. A scenario, written in &lt;a href=&#34;https://cucumber.io/docs/gherkin/reference/&#34;&gt;Gherkin&lt;/a&gt;, looks like this:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-gherkin&#34; data-lang=&#34;gherkin&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;Scenario:&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt; Add simple item with due date&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;    Given &lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;the user enters &amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;wash my car&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;&amp;#34;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;And &lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;the user adds a due date of &amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;1-1-2022&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;&amp;#34;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;When &lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;the user saves the item&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;Then &lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;the item &amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;wash my car&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;&amp;#34; is added to the list&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;And &lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;the due date is &amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;1-1-2022&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;&amp;#34;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This scenario is easy to implement, the item will be added and stored. That&amp;rsquo;s it. Easy to verify, no delays, straight forward. But what if you have some microservices with a queueing mechanism? A scenario where data will be queued before processing so we can&amp;rsquo;t exactly know when the data is processed?&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
