June 10 - Which is better to Code by Contract: TDD or API-first?

Hey hey :wave:,
I’m going to be speaking today at the First International Test-Driven Development (TDD) Conference. Here’s a little blip (okay maybe longer) about my talk:

During my time consulting clients on digital transformations and working my way through legacy code, I started on my TDD journey. I would often forget the keyword “driven” in Test-Driven Development and apply TDD as a Test Before Development variant. I focused on writing tests before code, and so did not have much impact on the design of the code. But once I learned to drive implementation via tests and the emphasis on the contract, my coding style started to differ drastically, for the better, of course.

Throughout my journey at Postman, I was exposed to another approach in the contract-driven toolbox called API-first. In this talk, I will compare the TDD and API-first approaches, analyzing parallels and observing their impact on contracts in software delivery.

See you there!

2 Likes

Looking forward to this :heavy_heart_exclamation: , would like to know how to involve buissness people into the postman space …now they are completely isolated

Hey @praveendvd,
I’ve been spending some time writing and talking about API specifications, and I realize how useful it would have been to my past project Business Analysts or PMs while working with third party APIs. I’d love to spend some time documenting that. Anything specific you’d like to help me with so I can shed light on that aspect as well?

1 Like

In case you missed it, here is the talk - First International TDD Conference - Saturday July 10, 2021 - YouTube
It was such an amazing experience, and you’ll love the conference if you want to or are interested in Agile, XP, Test-Driven Development, incremental value.

2 Likes

Thank you Meenakshi for the excellent talk , there is a push to use framework that supports executable specs like cucumber , speckflow , Fitnesse etc where a BA , PO etc also can get involve in defining the requirements.

In Postman I prefer to use data driven testing and uses csv to drive my entire automation , but it would be great to have some central portal like the collection runner where BAs can define the buissness cases , eg like in Fitnesse table ;

http://fitnesse.org/FitNesse.UserGuide.WritingAcceptanceTests.SliM.DecisionTable

Another thing all the people I interact with and myself voice for is to have something like htmlextra report in collection runner. There should be a way of downloading the run result has html report from the collection runner

1 Like

These are some brilliant suggestions @praveendvd. Have you added this as a feature request on our Github repo?

So Cucumber uses Gherkin that uses BDD and that’s probably why the writing can be easier for BAs, PO. I’m hoping that with the flow runner that the Postman CEO announced at Galaxy - Welcome Keynote with Abhinav Asthana | Postman Galaxy 2021 - YouTube we would be able to cater to BAs/POs as well.

Then again, your feedback is awesome @praveendvd. Please add it to Github for us to track in case you haven’t yet :slight_smile:

1 Like

For sure will add thanks @meenakshi.dhanani

1 Like

Wow that flow runner looks fire :fire:

1 Like

Here’s a link to the public workspace that I used during the talk - Which is Better to Code by Contract? TDD vs API-first public workspace

2 Likes