Consumer driven contracts | Within a company / ecosystem | Pact Emergent API development | Outside-in, lightweight, iterative | Highly collaborative teams
Definition Document (usually OpenAPI/fka Swagger) as a design artifact • Document serves as contract between Front-end and Back-end • Renders human-readable documentation • Drives a mock service for use as prototype
behaviour | Building on agile approaches | Encouraging teams to iterate rapidly | Example Mapping widely used for structured collaboration Documenting business-readable examples of agreed behaviour | Widespread use of Gherkin (Given/When/Then) Turn examples into living documentation using automation tool | Cucumber and SpecFlow understand Gherkin | Ongoing confusion in marketplace between BDD and Test Automation
understanding of the requirements through collaboration, typically achieved through a structured conversation centred on rules and examples Formulation Examples of system behaviourare documented using business terminology Automation The documentation is automated, creating living documentation that guides the system’s development and verifies its behaviour
& Example Maps for API Ideation? • We start by asking “what is the next behaviourto implement?” • Explored collaboratively with concrete examples • Documented using business terminology, SMEs can participate • Automated (Cucumber/SpecFlow, FIT/FitNesse etc.) • Failing documentation guides development & API Design • Just enough implementation to allow documentation to pass (stub is often enough) • Iterate (go back to top and pick the next behaviour)
social media app - with some similarities to Twitter - called Shouty. Users of the app will be able to 'shout' a textual message. Users within 1000 metres of the shouter will be able to read ('hear') the message. Shouty service
that are close to me, so that we can build a local community The range of a shout is 1000 metres C: Sean is 1200m from Lucy A: Sean shouts O: Lucy does not hear Sean C: Sean is 900m from Lucy A: Sean shouts O: Lucy hears Sean Business shouter can choose origin of a shout C: Sean is 1200m from Lucy A: Sean’s shout originates from a location 900m from Lucy O: Lucy hears Sean As a Shouty business user I can communicate with people that are close to my business premises, even when I am somewhere else Example mapping C: Sean is 900m from Lucy A: Sean’s shout originates from a location 1200m from Lucy O: Lucy does not hear Sean
– https://github.com/sebrose/shouty.java-connect • Learn more about BDD: • Free video courses – http://school.cucumber.io • BDD Books series http://bddbooks.com • Learn more about OpenAPI: • https://www.openapis.org/ • https://swagger.io/docs/specification/about/ • Products to help you: • https://cucumber.io/tools/cucumberstudio/ • https://swagger.io/tools/swaggerhub/