Comments on: Solving: How to test APIs with Gherkin? (#GivenWhenThenWithStyle – Challenge 21) https://gasparnagy.com/2021/03/solving-how-to-test-apis-with-gherkin-givenwhenthenwithstyle-challenge-21/ coach, trainer and bdd addict, creator of SpecFlow; owner of Spec Solutions Thu, 25 Mar 2021 09:26:06 +0000 hourly 1 https://wordpress.org/?v=6.9 By: Gáspár https://gasparnagy.com/2021/03/solving-how-to-test-apis-with-gherkin-givenwhenthenwithstyle-challenge-21/#comment-323 Thu, 25 Mar 2021 09:26:06 +0000 http://gasparnagy-com.lku.dkk.mybluehost.me/?p=1918#comment-323 In reply to Cirilo.

Yes, basically CDCT is to describe the behaviour of the API. It’s another question whether CDCT is described in Gherkin or in another DSL (as long as it is easily readable) — both would fit into the concept of BDD targeted documentation. Using Gherkin might have the benefit that it uses the same platform as the other BDD tests so it might be easier to present it and that you might be able to reuse some preparation (Given) steps from the other BDD scenarios.

]]>
By: Cirilo https://gasparnagy.com/2021/03/solving-how-to-test-apis-with-gherkin-givenwhenthenwithstyle-challenge-21/#comment-322 Wed, 24 Mar 2021 12:50:59 +0000 http://gasparnagy-com.lku.dkk.mybluehost.me/?p=1918#comment-322 I really like the approach in option three. It makes the tests very focused and readable and it’s possible to make interface changes without affecting the tests. I’ve seen option one go haywire quite severely. It starts out with one example, but grows beyond control after some time.
How do you feel Consumer driven contracts fit in, in regards to testing API’s? I think that CDCT can really be used as targeted documentation, for like minded stakeholders in the technical space.

]]>