Workshop API mocking with WireMock

In distributed software systems, integration testing is often blocked by dependencies developed outside your team.

While there’s no substitute for testing against ‘the real thing’, mocking systems at the API level can help you:

  • Test earlier
  • Test more
  • Test more often

But how do you write mocks efficiently? What are useful features when you’re mocking the behaviour of your dependencies?

In this workshop, you’ll learn how to start mocking the behaviour of your dependencies at the API level using WireMock, one of the most popular open source API mocking libraries available.

Workshop outline

This workshop covers the following topics:

  • The why and what of API mocking - when (not) to mock?
  • Setting up WireMock as part of your test suite
  • Writing and testing your first mocks
  • Using different request matching strategies
  • Fault simulation and modeling performance behaviour
  • Using response templating to reuse dynamic request values in your response
  • Modeling stateful behaviour in your mocks
  • Extending the behaviour of WireMock (Java only)

I can deliver this workshop using WireMock in Java and C#.

Intended audience and prerequisite knowledge

This course is aimed at software testers and developers that want to learn more about API mocking and how it can help them test earlier, more and more often.

Delivery and group size

This workshop is a great fit both for an on site or an online in house training session, as well as a half or full day conference tutorial. I recommend a maximum group size of around 15-20 people.

Duration

This workshop typically takes 3-4 hours, but can be extended to a full-day tutorial.

Interested?

If you would like to book me to teach this workshop in your organization or at your conference, or if you have any additional questions, please send an email to bas@ontestautomation.com or use the contact form on this page.

For an overview of all training courses and workshops I have on offer, please visit the main training page.