Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cTwospoons/camel-spock-test
A simple project to show how to use Spock to unit test Camel routes.
https://github.com/cTwospoons/camel-spock-test
apache-camel groovy spock spring-boot testing
Last synced: about 1 month ago
JSON representation
A simple project to show how to use Spock to unit test Camel routes.
- Host: GitHub
- URL: https://github.com/cTwospoons/camel-spock-test
- Owner: cTwospoons
- Created: 2017-08-19T16:05:02.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-08-20T15:40:39.000Z (over 7 years ago)
- Last Synced: 2024-06-08T18:39:05.360Z (6 months ago)
- Topics: apache-camel, groovy, spock, spring-boot, testing
- Language: Groovy
- Size: 56.6 KB
- Stars: 4
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-ccamel - cTwospoons/camel-spock-test - A simple project to show how to use Spock to unit test Camel routes. (Groovy)
README
# 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](http://camel.apache.org/) and [source code](https://github.com/apache/camel) available with instructions on it's use and various components.
This project uses [Spock](http://spockframework.org/) 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
```bash
./gradlew bootRun
```#### Running the tests
```bash
./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
```bash
curl http://localhost:8080/simple
```