logo logo

Dealing with Dependencies in Your Testing and Automation Efforts

Dealing with Dependencies in Your Testing and Automation Efforts

The purpose of this series of four articles is to introduce you to various ways in which you can use simulations to increase the efficiency and coverage of your test automation efforts. By reading the articles in this series, you’ll learn more about:

  • The first article will discuss the two types of challenges that dependencies pose when you’re trying to write targeted and efficient test automation, what problems they cause and how the use of simulations can help to mitigate them.
  • The next article will help you to get started with using mocking to isolate the method or class you want to test in your unit test from unwanted and unpredictable outside influences caused by dependent methods and classes. This article will contain runnable examples written using Mockito, a popular Java mocking framework.
  • Next, we’ll introduce the concept of service virtualization and how it can be used to simulate dependencies that are not available or pose other types of challenges by means of a number of examples written using WireMock, an open source service virtualization solution written in Java.
  • In the final article, we’ll explore some more advanced WireMock features to show you how a service virtualization solution can be used to simulate more realistic dependency behaviour required by your integration and end-to-end testing efforts.

Tutorial Chapters

  1. Increasing Test Efficiency with Simulations & Service Virtualization (Chapter 1)
  2. Isolating Components in Unit Tests with Mockito (Chapter 2)
  3. Getting Started with Service Virtualization using WireMock (Chapter 3)
  4. Simulating Rich Behaviour using Advanced WireMock Features (Chapter 4)

With the information presented in this article series, you’ll have everything you need to help you identify challenges caused by dependencies in your testing and test automation efforts, as well as pointers to solutions to solve them. You’ll also have a collection of runnable examples that you can use and build on to start using Mockito and WireMock in your own test automation efforts, or to expand and improve the way you’re already using these or similar tools.

Happy Testing! 🚀

About the author

Bas Dijkstra

Bas teaches companies around the world how to improve their testing efforts through test automation. He is an independent trainer, consultant and developer living in the Netherlands. When he’s not working he likes to take his bicycle for a ride, go for a run or read a good book.

Leave a Reply