Skip to content

bosch-io/ditto-testing

 
 

Repository files navigation

Eclipse Ditto™ Testing

This repository contains the "system tests" of Eclipse Ditto.
They ensure that on API level no regressions happen, that APIs stay stable and that added functionality is tested from a user perspective.

How to run tests in IntelliJ

System tests require the following components to run.

  1. Containers required by Ditto stack (MongoDB) and by connectivity tests (Mosquitto, Artemis etc.).
  2. A working Ditto stack, either as docker stack or launched from IntelliJ.
  3. A local authorization server mock.

Start MongoDB and message broker containers

If you want to launch Ditto from IntelliJ, start the MongoDB container:

cd docker
docker-compose up -d mongodb

If you want to run Ditto as a docker stack, simply run docker/start.sh. MongoDB is included.

Connectivity tests require message brokers. Start them thus:

cd docker

# AMQP broker
docker-compose up -d artemis

# MQTT broker
docker-compose up -d mqtt

# Kafka broker
docker-compose up -d kafka

# RabbitMQ broker
docker-compose up -d rabbitmq

The brokers do consume system resources. Start them on a by-need basis.

Run Ditto

To run Ditto as a docker stack, simply execute docker/start.sh. MongoDB is included.

To launch Ditto from IntelliJ, in debug mode for instance, run Policies first and the other required services after. A launch sequence could look like this:

  1. Policies
  2. Things
  3. Search
  4. Connectivity
  5. Gateway

Or, simply make use of the multirun plugin for which a run configuration also is available.

Authorization server mock

Tests authenticate themselves via OAuth against a mock server.
The tests make use of the mock-oauth2-server.

In order to run it, simply start it via compose:

cd docker

# OAuth mock server
docker-compose up -d oauth
``

About

No description, website, or topics provided.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 98.4%
  • Groovy 1.1%
  • Other 0.5%