Skip to content
A simple project to show how to use Spock to unit test Camel routes.
Groovy
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
gradle/wrapper
src
.gitignore
README.md
build.gradle
gradlew
gradlew.bat
settings.gradle

README.md

Camel Spock Testing

A simple project showing how to use Spock to unit test camel routes.

Introduction

Apache Camel is a popular integration framework with documentation and source code available with instructions on it's use and various components.

This project uses Spock to explore a simple way to unit test routing logic avoiding the need for a full-fledged integration context.

Requirements

  • Apache Camel
  • Spring Boot
  • Spock
  • Groovy

Running the App

Running locally

./gradlew bootRun

Running the tests

./gradlew test

Sending messages along the Camel routes

The app starts a basic Spring context with Spring Boot putting a request listener on the default port.

To send a message along the Camel routes when the app is running, issue a simple GET request to

curl http://localhost:8080/simple
You can’t perform that action at this time.