Book Image

Mastering Apache Camel

By : Bilgin Ismet Ibryam, Jean Baptiste Onofre, Jean-Baptiste Onofré
5 (1)
Book Image

Mastering Apache Camel

5 (1)
By: Bilgin Ismet Ibryam, Jean Baptiste Onofre, Jean-Baptiste Onofré

Overview of this book

Table of Contents (15 chapters)
Mastering Apache Camel
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Chapter 8. Testing

When we deal with an integration project, testing is vital to ensure that your logic works as expected. This means testing the different routing logic, and managing the errors that can happen during the routing.

Moreover, an integration project means that we use services or endpoints provided by different teams or third parties. Instead of waiting for the services and endpoints provided by the team, we can begin to implement our project by mocking the dependency services.

We can distinguish two kinds of tests:

  • Unit tests are focused on testing your routing logic. Basically, it tests the behaviors of your routes.

  • Integration tests are more dedicated to the installation and deployment of your routes in a container. These tests depend on the runtime container that you use to run your Camel routes.

Apache Camel provides the tool to easily implement unit tests—it's called a Camel test kit.

This chapter will introduce:

  • The unit test approach and how to use the different modules provided...