Skip to content

Commit

Permalink
Respond to comment
Browse files Browse the repository at this point in the history
  • Loading branch information
ploeh committed Oct 15, 2023
1 parent 03cb653 commit 75d280f
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions _posts/2023-10-02-dependency-whac-a-mole.html
Original file line number Diff line number Diff line change
Expand Up @@ -171,4 +171,53 @@ <h2 id="comments-header">
</div>
<div class="comment-date">2023-10-11 15:54 UTC</div>
</div>

<div class="comment" id="eef76159a60b4ee482238b1cd990ab94">
<div class="comment-author"><a href="/">Mark Seemann</a> <a href="#eef76159a60b4ee482238b1cd990ab94">#</a></div>
<div class="comment-content">
<p>
Callum, I was expecting someone to comment on including Gherkin on the list.
</p>
<p>
I don't consider all my examples as universally problematic. Rather, they often pop up in contexts where people seem to be struggling with a concept or a piece of technology with no apparent benefit.
</p>
<p>
I'm sure that when <a href="https://dannorth.net/">Dan North</a> came up with the idea of BDD and Gherkin, he actually <em>used</em> it. When used in the way it was originally intended, I can see it providing value.
</p>
<p>
Apart from Dan himself, however, I'm not aware that I've ever met anyone who has used BDD and Gherkin in that way. On the contrary, I've had more than one discussion that went like this:
</p>
<p>
<em>Interlocutor:</em> "We use BDD and Gherkin. It's great! You should try it."
</p>
<p>
<em>Me:</em> "Why?"
</p>
<p>
<em>Interlocutor:</em> "It enables us to <em>organise</em> our tests."
</p>
<p>
<em>Me:</em> "Can't you do that with the <a href="https://wiki.c2.com/?ArrangeActAssert">AAA</a> pattern?"
</p>
<p>
<em>Interlocutor:</em> "..."
</p>
<p>
<em>Me:</em> "Do any non-programmers ever look at your tests?"
</p>
<p>
<em>Interlocutor:</em> "No..."
</p>
<p>
If only programmers look at the test code, then why impose an artificial constraint? <em>Given-when-then</em> is just <em>arrange-act-assert</em> with different names, but free of Gherkin and the tooling that typically comes with it, you're free to write test code that follows normal good coding practices.
</p>
<p>
(As an aside, yes: Sometimes <a href="https://www.dotnetrocks.com/?show=1542">constraints liberate</a>, but what I've seen of Gherkin-based test code, this doesn't seem to be one of those cases.)
</p>
<p>
Finally, to be quite clear, although I may be repeating myself: If you're using Gherkin to interact with non-programmers on a regular basis, it may be beneficial. I've just never been in that situation, or met anyone other than Dan North who have.
</p>
</div>
<div class="comment-date">2023-10-15 14:35 UTC</div>
</div>
</div>

0 comments on commit 75d280f

Please sign in to comment.