A practical introduction to consumer contract testing with.NET
Since Microservices evolved as the state-of-the-art architecture for modern applications, testing the communication between microservices became an essential part of testing.
Since a complete application consists of the interaction of many microservices, their communication with each other should be explicitly tested to find bugs in the early stages of development.
A common approach for that kind of testing is consumer-contract testing, which means that the consumer of an API determines the contract that the provider is tested against.
A widely used framework for this is Pact.
In my workshop, I will practically show you how to use Pact for a .NET application to test your consumer and provider microservice.
Together we will set up the consumer tests, an infrastructure to manage the pacts and finally set up the provider side tests.
Participants should bring their own laptop and be familiar with an object-oriented programming language, ideally C#. A VM for developing will be provided.
Groovy API-Testing with Spock
With faster development cycles, testing on the API / REST level becomes an important tool in each testers toolbox.
With a lot of applications following the microservice architecture, a good understanding of API testing is even more important.
An API as such can be very complex, so it is beneficial to have a testing framework, which is light-weight in its setup and comparably easy to use.
Just consider the technical overhead in creating a simple JSON, when using Java.
In comparison, Groovy makes it even fun, that’s how easy it is to use.
In this talk I will practically demonstrate, how one can test a REST-API with Groovy and Spock.
Attendees will learn how to setup a new test project from scratch, how to create the first tests and how the reporting looks like.
We also have a look at how to implement a proper architecture, so that the tests stay maintainable and useful.
During this talk I will explain the advantages of using Groovy with Spock compared to plain Java Frameworks like Rest-Assured.