Beyond Contract Testing
- Contract Driven Development
2-day hands-on workshop
Get started with Contract Driven Development (CDD). This 2-day workshop offers a comprehensive, hands-on introduction to help Developers, Testers, Architects, DevOps and other stakeholders involved in the lifecycle of building complex applications.
Workshop overview
In this Workshop, you will get an in-depth, hands-on introduction to Contract Driven Development (CDD).
You will learn how to use OpenAPI specifications as executable contracts to achieve parallel development and independent deployment of your microservices & micro-frontends. In this process, you’ll learn how to shift-left the identification of integration issues to achieve quicker time to market.
This workshop is hand-crafted to provide Developers, Architects and Quality Engineers the essential techniques to foster a collaborative API Design first culture in their teams.
Leverage API Specifications
Create “Executable Contracts” from your API Specs that can be leveraged across various stages of application development.
Eliminate Integration Issues
Integration issues are minimized as the project goes through integration testing, ensuring a smoother and more reliable process.
Achieve Quicker Time to Market
Embrace parallel development, slash cycle times, and deliver products to market faster than ever before.
Build Team Collaboration
Keep both the client and service teams in sync with a central repo defining a clear and agreed-upon definition of the API spec.
The Workshop will cover
- The need to “Shift Left”
Why is integration testing ineffective? How you can leverage contract testing and service virtualization to validate your services conformance to API Specs to identify integration issues early.
- Learn types of APIs
How to collaboratively evolve API design and avoid rework.
- Learn API Designs principles and common code issues
Via a PR process, ensure backward breaking changes are prevented during API design rather than catching them during integration testing.
- Understand what defines “Contract Driven Development”
Building secure and resilient MicroServices by achieving higher API Coverage with Generative Tests (inspired by Property Based and Mutation Testing).
- Intelligent Service Virtualization
Cheap, Fast, Reliable Tests in a controlled environment using dependency-emulation & fault-injection.
- AI Test Data Management
Instantly generate domain specific test data by using the context in your API spec with GenAI.
- Service Dependency Visualization
Make informed architectural decisions based on deep integration insights.
- Fix API Spec and Implementation Conformance Mismatches
Run tests locally and as hard-gates in CI pipeline to ensure API Conformance.
- Gain Insights into your Microservices Architecture
Metrics to track CDD adoption and outcomes.
Specification Standards
Specification Editor and plugin in
Programming Languages
CDD
Linting
Workshop overview
Our hosts
Naresh Jain
Hari Krishnan
Joel Rosario
Jaydeep Kulkarni
2 Day Overview
Day 1
- Introductions
- Why is microservices architecture not yielding the expected results?
- Quick review of Test Pyramid and various types of tests
- Sneak-peek into Contract Driven Development in action
-
Leveraging API Specifications as Contract Tests – Using OpenAPI specs to generate contract tests in seconds without writing code
- Hands-on Lab 1
- API Coverage Report – Identify mismatch between your spec and implementation
- Understanding the difference between Contract Test and API Tests
- Types of contract testing and their mechanics – Consumer Driven, Provider Driven, Bi-directional. Understanding their pros and cons.
- How Contract Driven Development differs and also addresses the issues with traditional contract testing.
-
Using OpenAPI Examples as Test Data
- Hands-on Lab 2
LUNCH BREAK
-
Generating context aware domain relevant OpenAPI examples with Generative AI
- Hands-on Lab 3
-
Generative Tests – ensure Testing boundary conditions of your API specification
- Hands-on Lab 4
-
Externalising test data
- Hands-on Lab 5
- Central Contract Repo – Single source of truth for your API specifications, pre-merge checks on central contract repository – API Spec Linting
-
No code backward compatibility Testing and API Versioning Strategies to prevent backward breaking changes at API design stage
- Hands-on Lab 6
- Why Doc Gen (generating API spec from code) and Code Gen (generating code from API spec) does not guarantee that the API spec adheres to the code and vice versa
- Q & A
Day 2
- Recap of Day 1
-
Using API Specifications for Intelligent Service Virtualization to isolate dependencies
- Hands-on Lab 7
-
OpenAPI Examples as Stub Data
- Hands-on Lab 8
-
Recording API specifications and stub response
- Hands-on Lab 9
-
Mocking other dependencies such as databases
- Demo
- Externalizing stub data
LUNCH BREAK
-
Fault Injection testing – Delay simulation, error and empty responses and more
- Hands-on Lab 10
-
Running contract tests in CI pipelines
- Hands-on Lab 11
- Visualizing your architectural dependencies – Detecting integration risks, deprecation candidates and more
- CDD Metrics – Tracking health, value and outcome of your CDD adoption journey
- Developer workflow with CDD – Contract tests to drive development of a new API implementation followed by GenAI to write your unit tests
- Starting CDD adoption in your organization and anit-patterns to watch out for
- Q & A
Prerequisites
This workshop involves hands-on coding labs and group exercises. Bring your laptop.
- The labs will involve basic Java, Python or TS projects.
- Familiarity with API specifications such as OpenAPI / Swagger, AsyncAPI will be helpful, but not mandatory.
- Experience building and deploying microservices/micro-frontends will help you appreciate these labs.